Skip to content

Commit e622699

Browse files
committed
asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols
Most architectures do not need a custom implementation, and in most cases the generic implementation is preferred, so change the polariy on these Kconfig symbols to require architectures to select them when they provide their own version. The new name is CONFIG_ARCH_HAS_{STRNCPY_FROM,STRNLEN}_USER. The remaining architectures at the moment are: ia64, mips, parisc, um and xtensa. We should probably convert these as well, but I was not sure how far to take this series. Thomas Bogendoerfer had some concerns about converting mips but may still do some more detailed measurements to see which version is better. Cc: "James E.J. Bottomley" <[email protected]> Cc: Anton Ivanov <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Max Filippov <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Helge Deller <[email protected]> # parisc Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 166ec46 commit e622699

File tree

26 files changed

+19
-43
lines changed

26 files changed

+19
-43
lines changed

arch/alpha/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ config ALPHA
2929
select AUDIT_ARCH
3030
select GENERIC_CPU_VULNERABILITIES
3131
select GENERIC_SMP_IDLE_THREAD
32-
select GENERIC_STRNCPY_FROM_USER
33-
select GENERIC_STRNLEN_USER
3432
select HAVE_ARCH_AUDITSYSCALL
3533
select HAVE_MOD_ARCH_SPECIFIC
3634
select MODULES_USE_ELF_RELA

arch/arc/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ config ARC
2727
select GENERIC_PENDING_IRQ if SMP
2828
select GENERIC_SCHED_CLOCK
2929
select GENERIC_SMP_IDLE_THREAD
30-
select GENERIC_STRNCPY_FROM_USER
31-
select GENERIC_STRNLEN_USER
3230
select HAVE_ARCH_KGDB
3331
select HAVE_ARCH_TRACEHOOK
3432
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4

arch/arm/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ config ARM
6363
select GENERIC_PCI_IOMAP
6464
select GENERIC_SCHED_CLOCK
6565
select GENERIC_SMP_IDLE_THREAD
66-
select GENERIC_STRNCPY_FROM_USER
67-
select GENERIC_STRNLEN_USER
6866
select HANDLE_DOMAIN_IRQ
6967
select HARDIRQS_SW_RESEND
7068
select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT

arch/arm64/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ config ARM64
130130
select GENERIC_PTDUMP
131131
select GENERIC_SCHED_CLOCK
132132
select GENERIC_SMP_IDLE_THREAD
133-
select GENERIC_STRNCPY_FROM_USER
134-
select GENERIC_STRNLEN_USER
135133
select GENERIC_TIME_VSYSCALL
136134
select GENERIC_GETTIMEOFDAY
137135
select GENERIC_VDSO_TIME_NS

arch/csky/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ config CSKY
3535
select GENERIC_IRQ_MULTI_HANDLER
3636
select GENERIC_SCHED_CLOCK
3737
select GENERIC_SMP_IDLE_THREAD
38-
select GENERIC_STRNCPY_FROM_USER
39-
select GENERIC_STRNLEN_USER
4038
select GENERIC_TIME_VSYSCALL
4139
select GENERIC_VDSO_32
4240
select GENERIC_GETTIMEOFDAY

arch/h8300/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ config H8300
1111
select GENERIC_IRQ_SHOW
1212
select FRAME_POINTER
1313
select GENERIC_CPU_DEVICES
14-
select GENERIC_STRNCPY_FROM_USER
15-
select GENERIC_STRNLEN_USER
1614
select MODULES_USE_ELF_RELA
1715
select COMMON_CLK
1816
select ARCH_WANT_FRAME_POINTERS

arch/hexagon/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ config HEXAGON
1919
# GENERIC_ALLOCATOR is used by dma_alloc_coherent()
2020
select GENERIC_ALLOCATOR
2121
select GENERIC_IRQ_SHOW
22-
select GENERIC_STRNCPY_FROM_USER
23-
select GENERIC_STRNLEN_USER
2422
select HAVE_ARCH_KGDB
2523
select HAVE_ARCH_TRACEHOOK
2624
select NEED_SG_DMA_LENGTH

arch/ia64/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ menu "Processor type and features"
99
config IA64
1010
bool
1111
select ARCH_HAS_DMA_MARK_CLEAN
12+
select ARCH_HAS_STRNCPY_FROM_USER
13+
select ARCH_HAS_STRNLEN_USER
1214
select ARCH_MIGHT_HAVE_PC_PARPORT
1315
select ARCH_MIGHT_HAVE_PC_SERIO
1416
select ACPI

arch/m68k/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ config M68K
1616
select GENERIC_CPU_DEVICES
1717
select GENERIC_IOMAP
1818
select GENERIC_IRQ_SHOW
19-
select GENERIC_STRNCPY_FROM_USER
20-
select GENERIC_STRNLEN_USER
2119
select HAVE_AOUT if MMU
2220
select HAVE_ASM_MODVERSIONS
2321
select HAVE_DEBUG_BUGVERBOSE

arch/microblaze/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ config MICROBLAZE
2121
select GENERIC_IRQ_SHOW
2222
select GENERIC_PCI_IOMAP
2323
select GENERIC_SCHED_CLOCK
24-
select GENERIC_STRNCPY_FROM_USER
25-
select GENERIC_STRNLEN_USER
2624
select HAVE_ARCH_HASH
2725
select HAVE_ARCH_KGDB
2826
select HAVE_ARCH_SECCOMP

0 commit comments

Comments
 (0)