]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm: generalize ARCH_HAS_CACHE_LINE_SIZE
authorAnshuman Khandual <anshuman.khandual@arm.com>
Wed, 5 May 2021 01:38:09 +0000 (18:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:25 +0000 (11:27 -0700)
Patch series "mm: some config cleanups", v2.

This series contains config cleanup patches which reduces code
duplication across platforms and also improves maintainability.  There
is no functional change intended with this series.

This patch (of 6):

ARCH_HAS_CACHE_LINE_SIZE config has duplicate definitions on platforms
that subscribe it.  Instead, just make it a generic option which can be
selected on applicable platforms.  This change reduces code duplication
and makes it cleaner.

Link: https://lkml.kernel.org/r/1617259448-22529-1-git-send-email-anshuman.khandual@arm.com
Link: https://lkml.kernel.org/r/1617259448-22529-2-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com> [arm64]
Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc]
Cc: Will Deacon <will@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Palmer Dabbelt <palmerdabbelt@google.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arc/Kconfig
arch/arm64/Kconfig
arch/x86/Kconfig
mm/Kconfig

index bc8d6aecfbbdc8b55758b58d47568bd2751ec244..fab05f7189c080e8656a1d0eaf0f4155030ff747 100644 (file)
@@ -6,6 +6,7 @@
 config ARC
        def_bool y
        select ARC_TIMERS
+       select ARCH_HAS_CACHE_LINE_SIZE
        select ARCH_HAS_DEBUG_VM_PGTABLE
        select ARCH_HAS_DMA_PREP_COHERENT
        select ARCH_HAS_PTE_SPECIAL
@@ -48,9 +49,6 @@ config ARC
        select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
        select SET_FS
 
-config ARCH_HAS_CACHE_LINE_SIZE
-       def_bool y
-
 config TRACE_IRQFLAGS_SUPPORT
        def_bool y
 
index 04c69f6065372127b9c90ab74d40161c32a09181..86dfaac79e490e0836914d170781ccda6eb147f6 100644 (file)
@@ -11,6 +11,7 @@ config ARM64
        select ACPI_PPTT if ACPI
        select ARCH_HAS_DEBUG_WX
        select ARCH_BINFMT_ELF_STATE
+       select ARCH_HAS_CACHE_LINE_SIZE
        select ARCH_HAS_DEBUG_VIRTUAL
        select ARCH_HAS_DEBUG_VM_PGTABLE
        select ARCH_HAS_DMA_PREP_COHERENT
@@ -1074,9 +1075,6 @@ config HW_PERF_EVENTS
 config SYS_SUPPORTS_HUGETLBFS
        def_bool y
 
-config ARCH_HAS_CACHE_LINE_SIZE
-       def_bool y
-
 config ARCH_HAS_FILTER_PGPROT
        def_bool y
 
index 1c350e8782edc7b465798a67757c4718c0993749..78c475d8c4094e6da56cbde977a7019e967982ce 100644 (file)
@@ -61,6 +61,7 @@ config X86
        select ARCH_32BIT_OFF_T                 if X86_32
        select ARCH_CLOCKSOURCE_INIT
        select ARCH_HAS_ACPI_TABLE_UPGRADE      if ACPI
+       select ARCH_HAS_CACHE_LINE_SIZE
        select ARCH_HAS_DEBUG_VIRTUAL
        select ARCH_HAS_DEBUG_VM_PGTABLE        if !X86_PAE
        select ARCH_HAS_DEVMEM_IS_ALLOWED
@@ -316,9 +317,6 @@ config GENERIC_CALIBRATE_DELAY
 config ARCH_HAS_CPU_RELAX
        def_bool y
 
-config ARCH_HAS_CACHE_LINE_SIZE
-       def_bool y
-
 config ARCH_HAS_FILTER_PGPROT
        def_bool y
 
index 5f7d7b3d8cc291f6e1bfedfa001e56cee1ccad85..8d6fb99aededb11fa2edfbdcf2dde397a4e37f95 100644 (file)
@@ -772,6 +772,9 @@ config IDLE_PAGE_TRACKING
          See Documentation/admin-guide/mm/idle_page_tracking.rst for
          more details.
 
+config ARCH_HAS_CACHE_LINE_SIZE
+       bool
+
 config ARCH_HAS_PTE_DEVMAP
        bool