瀏覽代碼

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>
Heiko Carstens 12 年之前
父節點
當前提交
a4f32bdbd9
共有 3 個文件被更改,包括 8 次插入6 次删除
  1. 0 1
      arch/s390/include/asm/pgtable.h
  2. 8 4
      arch/s390/mm/fault.c
  3. 0 1
      arch/s390/mm/init.c

+ 0 - 1
arch/s390/include/asm/pgtable.h

@@ -35,7 +35,6 @@
 extern pgd_t swapper_pg_dir[] __attribute__ ((aligned (4096)));
 extern pgd_t swapper_pg_dir[] __attribute__ ((aligned (4096)));
 extern void paging_init(void);
 extern void paging_init(void);
 extern void vmem_map_init(void);
 extern void vmem_map_init(void);
-extern void fault_init(void);
 
 
 /*
 /*
  * The S390 doesn't have any external MMU info: the kernel page
  * The S390 doesn't have any external MMU info: the kernel page

+ 8 - 4
arch/s390/mm/fault.c

@@ -49,15 +49,19 @@
 #define VM_FAULT_BADCONTEXT	0x010000
 #define VM_FAULT_BADCONTEXT	0x010000
 #define VM_FAULT_BADMAP		0x020000
 #define VM_FAULT_BADMAP		0x020000
 #define VM_FAULT_BADACCESS	0x040000
 #define VM_FAULT_BADACCESS	0x040000
-#define VM_FAULT_SIGNAL	0x080000
+#define VM_FAULT_SIGNAL		0x080000
 
 
-static unsigned long store_indication;
+static unsigned long store_indication __read_mostly;
 
 
-void fault_init(void)
+#ifdef CONFIG_64BIT
+static int __init fault_init(void)
 {
 {
-	if (test_facility(2) && test_facility(75))
+	if (test_facility(75))
 		store_indication = 0xc00;
 		store_indication = 0xc00;
+	return 0;
 }
 }
+early_initcall(fault_init);
+#endif
 
 
 static inline int notify_page_fault(struct pt_regs *regs)
 static inline int notify_page_fault(struct pt_regs *regs)
 {
 {

+ 0 - 1
arch/s390/mm/init.c

@@ -125,7 +125,6 @@ void __init paging_init(void)
 	max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS);
 	max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS);
 	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
 	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
 	free_area_init_nodes(max_zone_pfns);
 	free_area_init_nodes(max_zone_pfns);
-	fault_init();
 }
 }
 
 
 void __init mem_init(void)
 void __init mem_init(void)