Skip to content

Commit e950d1f

Browse files
committed
s390/percpu: Get rid of ARCH_MODULE_NEEDS_WEAK_PER_CPU
Since the rework of the kernel virtual address space [1] the module area and the kernel image are within the same 4GB area. Therefore there is no need for the weak per cpu workaround for modules anymore. Remove it. [1] commit c98d2ec ("s390/mm: Uncouple physical vs virtual address spaces") Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent f555d88 commit e950d1f

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ config S390
140140
select ARCH_INLINE_WRITE_UNLOCK_IRQ
141141
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
142142
select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
143-
select ARCH_MODULE_NEEDS_WEAK_PER_CPU
144143
select ARCH_STACKWALK
145144
select ARCH_SUPPORTS_ATOMIC_RMW
146145
select ARCH_SUPPORTS_DEBUG_PAGEALLOC

arch/s390/include/asm/percpu.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212
*/
1313
#define __my_cpu_offset get_lowcore()->percpu_offset
1414

15-
/*
16-
* For 64 bit module code, the module may be more than 4G above the
17-
* per cpu area, use weak definitions to force the compiler to
18-
* generate external references.
19-
* Therefore, we have enabled CONFIG_ARCH_MODULE_NEEDS_WEAK_PER_CPU
20-
* in the Kconfig.
21-
*/
22-
2315
/*
2416
* We use a compare-and-swap loop since that uses less cpu cycles than
2517
* disabling and enabling interrupts like the generic variant would do.

include/linux/percpu-defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
__section(".discard") __attribute__((unused))
5353

5454
/*
55-
* s390 and alpha modules require percpu variables to be defined as
55+
* alpha modules require percpu variables to be defined as
5656
* weak to force the compiler to generate GOT based external
5757
* references for them. This is necessary because percpu sections
5858
* will be located outside of the usually addressable area.

0 commit comments

Comments
 (0)