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

s390/mm: keep fault_init() private to fault.c

Just convert fault_init() to an early initcall. That's still early
enough since it only needs be called before user space processes get
executed. No reason to externalize it.
Also add the function to the init section and move the store_indication
variable to the read_mostly section.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
a4f32bdb 287a0933

+8 -6
-1
arch/s390/include/asm/pgtable.h
··· 35 35 extern pgd_t swapper_pg_dir[] __attribute__ ((aligned (4096))); 36 36 extern void paging_init(void); 37 37 extern void vmem_map_init(void); 38 - extern void fault_init(void); 39 38 40 39 /* 41 40 * The S390 doesn't have any external MMU info: the kernel page
+8 -4
arch/s390/mm/fault.c
··· 49 49 #define VM_FAULT_BADCONTEXT 0x010000 50 50 #define VM_FAULT_BADMAP 0x020000 51 51 #define VM_FAULT_BADACCESS 0x040000 52 - #define VM_FAULT_SIGNAL 0x080000 52 + #define VM_FAULT_SIGNAL 0x080000 53 53 54 - static unsigned long store_indication; 54 + static unsigned long store_indication __read_mostly; 55 55 56 - void fault_init(void) 56 + #ifdef CONFIG_64BIT 57 + static int __init fault_init(void) 57 58 { 58 - if (test_facility(2) && test_facility(75)) 59 + if (test_facility(75)) 59 60 store_indication = 0xc00; 61 + return 0; 60 62 } 63 + early_initcall(fault_init); 64 + #endif 61 65 62 66 static inline int notify_page_fault(struct pt_regs *regs) 63 67 {
-1
arch/s390/mm/init.c
··· 125 125 max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); 126 126 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 127 127 free_area_init_nodes(max_zone_pfns); 128 - fault_init(); 129 128 } 130 129 131 130 void __init mem_init(void)