Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 14 Nov 2021 19:30:50 +0000 (11:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 14 Nov 2021 19:30:50 +0000 (11:30 -0800)
Pull ARM fixes from Russell King:

 - Fix early_iounmap

 - Drop cc-option fallbacks for architecture selection

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9156/1: drop cc-option fallbacks for architecture selection
  ARM: 9155/1: fix early early_iounmap()

arch/arm/Makefile
arch/arm/mm/mmu.c

index a522716565c6fc733355526e91673da337d97db1..77172d555c7e722fce05a04022cde085a7aecb42 100644 (file)
@@ -60,15 +60,15 @@ KBUILD_CFLAGS       += $(call cc-option,-fno-ipa-sra)
 # Note that GCC does not numerically define an architecture version
 # macro, but instead defines a whole series of macros which makes
 # testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7M)       =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
-arch-$(CONFIG_CPU_32v7)                =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
-arch-$(CONFIG_CPU_32v6)                =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
+arch-$(CONFIG_CPU_32v7M)       =-D__LINUX_ARM_ARCH__=7 -march=armv7-m
+arch-$(CONFIG_CPU_32v7)                =-D__LINUX_ARM_ARCH__=7 -march=armv7-a
+arch-$(CONFIG_CPU_32v6)                =-D__LINUX_ARM_ARCH__=6 -march=armv6
 # Only override the compiler option if ARMv6. The ARMv6K extensions are
 # always available in ARMv7
 ifeq ($(CONFIG_CPU_32v6),y)
-arch-$(CONFIG_CPU_32v6K)       =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k)
+arch-$(CONFIG_CPU_32v6K)       =-D__LINUX_ARM_ARCH__=6 -march=armv6k
 endif
-arch-$(CONFIG_CPU_32v5)                =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
+arch-$(CONFIG_CPU_32v5)                =-D__LINUX_ARM_ARCH__=5 -march=armv5te
 arch-$(CONFIG_CPU_32v4T)       =-D__LINUX_ARM_ARCH__=4 -march=armv4t
 arch-$(CONFIG_CPU_32v4)                =-D__LINUX_ARM_ARCH__=4 -march=armv4
 arch-$(CONFIG_CPU_32v3)                =-D__LINUX_ARM_ARCH__=3 -march=armv3m
@@ -82,7 +82,7 @@ tune-$(CONFIG_CPU_ARM720T)    =-mtune=arm7tdmi
 tune-$(CONFIG_CPU_ARM740T)     =-mtune=arm7tdmi
 tune-$(CONFIG_CPU_ARM9TDMI)    =-mtune=arm9tdmi
 tune-$(CONFIG_CPU_ARM940T)     =-mtune=arm9tdmi
-tune-$(CONFIG_CPU_ARM946E)     =$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi)
+tune-$(CONFIG_CPU_ARM946E)     =-mtune=arm9e
 tune-$(CONFIG_CPU_ARM920T)     =-mtune=arm9tdmi
 tune-$(CONFIG_CPU_ARM922T)     =-mtune=arm9tdmi
 tune-$(CONFIG_CPU_ARM925T)     =-mtune=arm9tdmi
@@ -90,11 +90,11 @@ tune-$(CONFIG_CPU_ARM926T)  =-mtune=arm9tdmi
 tune-$(CONFIG_CPU_FA526)       =-mtune=arm9tdmi
 tune-$(CONFIG_CPU_SA110)       =-mtune=strongarm110
 tune-$(CONFIG_CPU_SA1100)      =-mtune=strongarm1100
-tune-$(CONFIG_CPU_XSCALE)      =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
-tune-$(CONFIG_CPU_XSC3)                =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
-tune-$(CONFIG_CPU_FEROCEON)    =$(call cc-option,-mtune=marvell-f,-mtune=xscale)
-tune-$(CONFIG_CPU_V6)          =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
-tune-$(CONFIG_CPU_V6K)         =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
+tune-$(CONFIG_CPU_XSCALE)      =-mtune=xscale
+tune-$(CONFIG_CPU_XSC3)                =-mtune=xscale
+tune-$(CONFIG_CPU_FEROCEON)    =-mtune=xscale
+tune-$(CONFIG_CPU_V6)          =-mtune=arm1136j-s
+tune-$(CONFIG_CPU_V6K)         =-mtune=arm1136j-s
 
 # Evaluate tune cc-option calls now
 tune-y := $(tune-y)
index a4e0060051070f5dec2c910c7d7f708794313d09..274e4f73fd33c21c3179d2a5a9090688e6e2c6bf 100644 (file)
@@ -390,9 +390,9 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
        BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) < FIXADDR_START);
        BUG_ON(idx >= __end_of_fixed_addresses);
 
-       /* we only support device mappings until pgprot_kernel has been set */
+       /* We support only device mappings before pgprot_kernel is set. */
        if (WARN_ON(pgprot_val(prot) != pgprot_val(FIXMAP_PAGE_IO) &&
-                   pgprot_val(pgprot_kernel) == 0))
+                   pgprot_val(prot) && pgprot_val(pgprot_kernel) == 0))
                return;
 
        if (pgprot_val(prot))