Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H

Given that we want the default to not have any <mach/memory.h> and given
that there are now fewer cases where it is still provided than the cases
where it is not at this point, this makes sense to invert the logic and
just identify the exception cases.

The word "need" instead of "have" was chosen to construct the config
symbol so not to suggest that having a mach/memory.h file is actually
a feature that one should aim for.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>

authored by

Nicolas Pitre and committed by
Nicolas Pitre
0cdc8b92 48de58e3

+24 -41
+22 -39
arch/arm/Kconfig
··· 211 211 this feature (eg, building a kernel for a single machine) and 212 212 you need to shrink the kernel to the minimal size. 213 213 214 - config NO_MACH_MEMORY_H 214 + config NEED_MACH_MEMORY_H 215 215 bool 216 216 help 217 - Select this when mach/memory.h is removed. 217 + Select this when mach/memory.h is required to provide special 218 + definitions for this platform. The need for mach/memory.h should 219 + be avoided when possible. 218 220 219 221 config PHYS_OFFSET 220 222 hex "Physical address of main memory" 221 - depends on !ARM_PATCH_PHYS_VIRT && NO_MACH_MEMORY_H 223 + depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H 222 224 help 223 225 Please provide the physical address corresponding to the 224 226 location of main memory in your system. ··· 256 254 select GENERIC_CLOCKEVENTS 257 255 select PLAT_VERSATILE 258 256 select PLAT_VERSATILE_FPGA_IRQ 257 + select NEED_MACH_MEMORY_H 259 258 help 260 259 Support for ARM's Integrator platform. 261 260 ··· 272 269 select PLAT_VERSATILE_CLCD 273 270 select ARM_TIMER_SP804 274 271 select GPIO_PL061 if GPIOLIB 272 + select NEED_MACH_MEMORY_H 275 273 help 276 274 This enables support for ARM Ltd RealView boards. 277 275 ··· 289 285 select PLAT_VERSATILE_CLCD 290 286 select PLAT_VERSATILE_FPGA_IRQ 291 287 select ARM_TIMER_SP804 292 - select NO_MACH_MEMORY_H 293 288 help 294 289 This enables support for ARM Ltd Versatile board. 295 290 ··· 305 302 select ICST 306 303 select PLAT_VERSATILE 307 304 select PLAT_VERSATILE_CLCD 308 - select NO_MACH_MEMORY_H 309 305 help 310 306 This enables support for the ARM Ltd Versatile Express boards. 311 307 ··· 326 324 select CLKDEV_LOOKUP 327 325 select GENERIC_CLOCKEVENTS 328 326 select ARCH_WANT_OPTIONAL_GPIOLIB 329 - select NO_MACH_MEMORY_H 330 327 help 331 328 Support for Broadcom's BCMRing platform. 332 329 ··· 333 332 bool "Cirrus Logic CLPS711x/EP721x-based" 334 333 select CPU_ARM720T 335 334 select ARCH_USES_GETTIMEOFFSET 335 + select NEED_MACH_MEMORY_H 336 336 help 337 337 Support for Cirrus Logic 711x/721x based boards. 338 338 ··· 344 342 select ARM_GIC 345 343 select MIGHT_HAVE_PCI 346 344 select PCI_DOMAINS if PCI 347 - select NO_MACH_MEMORY_H 348 345 help 349 346 Support for Cavium Networks CNS3XXX platform. 350 347 ··· 352 351 select CPU_FA526 353 352 select ARCH_REQUIRE_GPIOLIB 354 353 select ARCH_USES_GETTIMEOFFSET 355 - select NO_MACH_MEMORY_H 356 354 help 357 355 Support for the Cortina Systems Gemini family SoCs 358 356 ··· 365 365 select GENERIC_IRQ_CHIP 366 366 select USE_OF 367 367 select ZONE_DMA 368 - select NO_MACH_MEMORY_H 369 368 help 370 369 Support for CSR SiRFSoC ARM Cortex A9 Platform 371 370 ··· 374 375 select ISA 375 376 select NO_IOPORT 376 377 select ARCH_USES_GETTIMEOFFSET 378 + select NEED_MACH_MEMORY_H 377 379 help 378 380 This is an evaluation board for the StrongARM processor available 379 381 from Digital. It has limited hardware on-board, including an ··· 390 390 select ARCH_REQUIRE_GPIOLIB 391 391 select ARCH_HAS_HOLES_MEMORYMODEL 392 392 select ARCH_USES_GETTIMEOFFSET 393 + select NEED_MEMORY_H 393 394 help 394 395 This enables support for the Cirrus EP93xx series of CPUs. 395 396 ··· 399 398 select CPU_SA110 400 399 select FOOTBRIDGE 401 400 select GENERIC_CLOCKEVENTS 401 + select NEED_MACH_MEMORY_H 402 402 help 403 403 Support for systems based on the DC21285 companion chip 404 404 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. ··· 412 410 select CLKSRC_MMIO 413 411 select GENERIC_IRQ_CHIP 414 412 select HAVE_SCHED_CLOCK 415 - select NO_MACH_MEMORY_H 416 413 help 417 414 Support for Freescale MXC/iMX-based family of processors 418 415 ··· 421 420 select ARCH_REQUIRE_GPIOLIB 422 421 select CLKDEV_LOOKUP 423 422 select CLKSRC_MMIO 424 - select NO_MACH_MEMORY_H 425 423 help 426 424 Support for Freescale MXS-based family of processors 427 425 ··· 430 430 select CPU_ARM926T 431 431 select ARM_VIC 432 432 select GENERIC_CLOCKEVENTS 433 - select NO_MACH_MEMORY_H 434 433 help 435 434 This enables support for systems based on the Hilscher NetX Soc 436 435 ··· 438 439 select CPU_ARM720T 439 440 select ISA_DMA_API 440 441 select ARCH_USES_GETTIMEOFFSET 441 - select NO_MACH_MEMORY_H 442 442 help 443 443 This enables support for systems based on the Hynix HMS720x 444 444 ··· 449 451 select PCI 450 452 select ARCH_SUPPORTS_MSI 451 453 select VMSPLIT_1G 454 + select NEED_MACH_MEMORY_H 452 455 help 453 456 Support for Intel's IOP13XX (XScale) family of processors. 454 457 ··· 460 461 select PLAT_IOP 461 462 select PCI 462 463 select ARCH_REQUIRE_GPIOLIB 463 - select NO_MACH_MEMORY_H 464 464 help 465 465 Support for Intel's 80219 and IOP32X (XScale) family of 466 466 processors. ··· 471 473 select PLAT_IOP 472 474 select PCI 473 475 select ARCH_REQUIRE_GPIOLIB 474 - select NO_MACH_MEMORY_H 475 476 help 476 477 Support for Intel's IOP33X (XScale) family of processors. 477 478 ··· 480 483 select CPU_XSC3 481 484 select PCI 482 485 select ARCH_USES_GETTIMEOFFSET 486 + select NEED_MACH_MEMORY_H 483 487 help 484 488 Support for Intel's IXP23xx (XScale) family of processors. 485 489 ··· 490 492 select CPU_XSCALE 491 493 select PCI 492 494 select ARCH_USES_GETTIMEOFFSET 495 + select NEED_MACH_MEMORY_H 493 496 help 494 497 Support for Intel's IXP2400/2800 (XScale) family of processors. 495 498 ··· 504 505 select HAVE_SCHED_CLOCK 505 506 select MIGHT_HAVE_PCI 506 507 select DMABOUNCE if PCI 507 - select NO_MACH_MEMORY_H 508 508 help 509 509 Support for Intel's IXP4XX (XScale) family of processors. 510 510 ··· 514 516 select ARCH_REQUIRE_GPIOLIB 515 517 select GENERIC_CLOCKEVENTS 516 518 select PLAT_ORION 517 - select NO_MACH_MEMORY_H 518 519 help 519 520 Support for the Marvell Dove SoC 88AP510 520 521 ··· 524 527 select ARCH_REQUIRE_GPIOLIB 525 528 select GENERIC_CLOCKEVENTS 526 529 select PLAT_ORION 527 - select NO_MACH_MEMORY_H 528 530 help 529 531 Support for the following Marvell Kirkwood series SoCs: 530 532 88F6180, 88F6192 and 88F6281. ··· 539 543 select CLKDEV_LOOKUP 540 544 select GENERIC_TIME 541 545 select GENERIC_CLOCKEVENTS 542 - select NO_MACH_MEMORY_H 543 546 help 544 547 Support for the NXP LPC32XX family of processors 545 548 ··· 549 554 select ARCH_REQUIRE_GPIOLIB 550 555 select GENERIC_CLOCKEVENTS 551 556 select PLAT_ORION 552 - select NO_MACH_MEMORY_H 553 557 help 554 558 Support for the following Marvell MV78xx0 series SoCs: 555 559 MV781x0, MV782x0. ··· 561 567 select ARCH_REQUIRE_GPIOLIB 562 568 select GENERIC_CLOCKEVENTS 563 569 select PLAT_ORION 564 - select NO_MACH_MEMORY_H 565 570 help 566 571 Support for the following Marvell Orion 5x series SoCs: 567 572 Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), ··· 576 583 select TICK_ONESHOT 577 584 select PLAT_PXA 578 585 select SPARSE_IRQ 579 - select NO_MACH_MEMORY_H 580 586 help 581 587 Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. 582 588 ··· 584 592 select CPU_ARM922T 585 593 select ARCH_REQUIRE_GPIOLIB 586 594 select ARCH_USES_GETTIMEOFFSET 595 + select NEED_MACH_MEMORY_H 587 596 help 588 597 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based 589 598 System-on-Chip devices. ··· 596 603 select CLKDEV_LOOKUP 597 604 select CLKSRC_MMIO 598 605 select GENERIC_CLOCKEVENTS 599 - select NO_MACH_MEMORY_H 600 606 help 601 607 Support for Nuvoton (Winbond logic dept.) ARM9 processor, 602 608 At present, the w90x900 has been renamed nuc900, regarding ··· 609 617 bool "Nuvoton NUC93X CPU" 610 618 select CPU_ARM926T 611 619 select CLKDEV_LOOKUP 612 - select NO_MACH_MEMORY_H 613 620 help 614 621 Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a 615 622 low-power and high performance MPEG-4/JPEG multimedia controller chip. ··· 623 632 select HAVE_CLK 624 633 select HAVE_SCHED_CLOCK 625 634 select ARCH_HAS_CPUFREQ 626 - select NO_MACH_MEMORY_H 627 635 help 628 636 This enables support for NVIDIA Tegra based systems (Tegra APX, 629 637 Tegra 6xx and Tegra 2 series). ··· 632 642 select CPU_ARM926T 633 643 select CLKDEV_LOOKUP 634 644 select ARCH_USES_GETTIMEOFFSET 635 - select NO_MACH_MEMORY_H 636 645 help 637 646 This enables support for Philips PNX4008 mobile platform. 638 647 ··· 650 661 select SPARSE_IRQ 651 662 select AUTO_ZRELADDR 652 663 select MULTI_IRQ_HANDLER 653 - select NO_MACH_MEMORY_H 654 664 help 655 665 Support for Intel/Marvell's PXA2xx/PXA3xx processor line. 656 666 ··· 659 671 select GENERIC_CLOCKEVENTS 660 672 select ARCH_REQUIRE_GPIOLIB 661 673 select CLKDEV_LOOKUP 662 - select NO_MACH_MEMORY_H 663 674 help 664 675 Support for Qualcomm MSM/QSD based systems. This runs on the 665 676 apps processor of the MSM/QSD and depends on a shared memory ··· 676 689 select SPARSE_IRQ 677 690 select MULTI_IRQ_HANDLER 678 691 select PM_GENERIC_DOMAINS if PM 692 + select NEED_MACH_MEMORY_H 679 693 help 680 694 Support for Renesas's SH-Mobile and R-Mobile ARM platforms. 681 695 ··· 691 703 select NO_IOPORT 692 704 select ARCH_SPARSEMEM_ENABLE 693 705 select ARCH_USES_GETTIMEOFFSET 706 + select NEED_MACH_MEMORY_H 694 707 help 695 708 On the Acorn Risc-PC, Linux can support the internal IDE disk and 696 709 CD-ROM interface, serial and parallel port, and the floppy drive. ··· 710 721 select HAVE_SCHED_CLOCK 711 722 select TICK_ONESHOT 712 723 select ARCH_REQUIRE_GPIOLIB 724 + select NEED_MACH_MEMORY_H 713 725 help 714 726 Support for StrongARM 11x0 based boards. 715 727 ··· 722 732 select CLKDEV_LOOKUP 723 733 select ARCH_USES_GETTIMEOFFSET 724 734 select HAVE_S3C2410_I2C if I2C 725 - select NO_MACH_MEMORY_H 726 735 help 727 736 Samsung S3C2410X CPU based systems, such as the Simtec Electronics 728 737 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or ··· 754 765 select SAMSUNG_GPIOLIB_4BIT 755 766 select HAVE_S3C2410_I2C if I2C 756 767 select HAVE_S3C2410_WATCHDOG if WATCHDOG 757 - select NO_MACH_MEMORY_H 758 768 help 759 769 Samsung S3C64XX series based systems 760 770 ··· 769 781 select HAVE_SCHED_CLOCK 770 782 select HAVE_S3C2410_I2C if I2C 771 783 select HAVE_S3C_RTC if RTC_CLASS 772 - select NO_MACH_MEMORY_H 773 784 help 774 785 Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, 775 786 SMDK6450. ··· 784 797 select HAVE_S3C2410_I2C if I2C 785 798 select HAVE_S3C_RTC if RTC_CLASS 786 799 select HAVE_S3C2410_WATCHDOG if WATCHDOG 787 - select NO_MACH_MEMORY_H 788 800 help 789 801 Samsung S5PC100 series based systems 790 802 ··· 803 817 select HAVE_S3C2410_I2C if I2C 804 818 select HAVE_S3C_RTC if RTC_CLASS 805 819 select HAVE_S3C2410_WATCHDOG if WATCHDOG 820 + select NEED_MACH_MEMORY_H 806 821 help 807 822 Samsung S5PV210/S5PC110 series based systems 808 823 ··· 820 833 select HAVE_S3C_RTC if RTC_CLASS 821 834 select HAVE_S3C2410_I2C if I2C 822 835 select HAVE_S3C2410_WATCHDOG if WATCHDOG 836 + select NEED_MACH_MEMORY_H 823 837 help 824 838 Samsung EXYNOS4 series based systems 825 839 ··· 832 844 select ZONE_DMA 833 845 select PCI 834 846 select ARCH_USES_GETTIMEOFFSET 847 + select NEED_MACH_MEMORY_H 835 848 help 836 849 Support for the StrongARM based Digital DNARD machine, also known 837 850 as "Shark" (<http://www.shark-linux.de/shark.html>). ··· 844 855 select HAVE_CLK 845 856 select CLKDEV_LOOKUP 846 857 select GENERIC_CLOCKEVENTS 847 - select NO_MACH_MEMORY_H 848 858 help 849 859 Support for Telechips TCC ARM926-based systems. 850 860 ··· 860 872 select CLKDEV_LOOKUP 861 873 select HAVE_MACH_CLKDEV 862 874 select GENERIC_GPIO 875 + select NEED_MACH_MEMORY_H 863 876 help 864 877 Support for ST-Ericsson U300 series mobile platforms. 865 878 ··· 872 883 select CLKDEV_LOOKUP 873 884 select ARCH_REQUIRE_GPIOLIB 874 885 select ARCH_HAS_CPUFREQ 875 - select NO_MACH_MEMORY_H 876 886 help 877 887 Support for ST-Ericsson's Ux500 architecture 878 888 ··· 883 895 select CLKDEV_LOOKUP 884 896 select GENERIC_CLOCKEVENTS 885 897 select ARCH_REQUIRE_GPIOLIB 886 - select NO_MACH_MEMORY_H 887 898 help 888 899 Support for the Nomadik platform by ST-Ericsson 889 900 ··· 896 909 select GENERIC_ALLOCATOR 897 910 select GENERIC_IRQ_CHIP 898 911 select ARCH_HAS_HOLES_MEMORYMODEL 899 - select NO_MACH_MEMORY_H 900 912 help 901 913 Support for TI's DaVinci platform. 902 914 ··· 919 933 select CLKSRC_MMIO 920 934 select GENERIC_CLOCKEVENTS 921 935 select HAVE_CLK 922 - select NO_MACH_MEMORY_H 923 936 help 924 937 Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx). 925 938 ··· 930 945 select GENERIC_CLOCKEVENTS 931 946 select ARCH_REQUIRE_GPIOLIB 932 947 select HAVE_PWM 933 - select NO_MACH_MEMORY_H 934 948 help 935 949 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. 936 950 ··· 943 959 select ARM_AMBA 944 960 select ICST 945 961 select USE_OF 946 - select NO_MACH_MEMORY_H 947 962 help 948 963 Support for Xilinx Zynq ARM Cortex A9 Platform 949 964 endchoice
+1 -1
arch/arm/include/asm/memory.h
··· 18 18 #include <linux/types.h> 19 19 #include <asm/sizes.h> 20 20 21 - #ifndef CONFIG_NO_MACH_MEMORY_H 21 + #ifdef CONFIG_NEED_MACH_MEMORY_H 22 22 #include <mach/memory.h> 23 23 #endif 24 24
+1 -1
arch/arm/plat-omap/Kconfig
··· 14 14 select CLKDEV_LOOKUP 15 15 select CLKSRC_MMIO 16 16 select GENERIC_IRQ_CHIP 17 + select NEED_MACH_MEMORY_H 17 18 help 18 19 "Systems based on omap7xx, omap15xx or omap16xx" 19 20 ··· 23 22 select CLKDEV_LOOKUP 24 23 select GENERIC_IRQ_CHIP 25 24 select OMAP_DM_TIMER 26 - select NO_MACH_MEMORY_H 27 25 help 28 26 "Systems based on OMAP2, OMAP3 or OMAP4" 29 27