parisc: iosapic: Convert I/O Sapic driver to use arch_initcall()
authorHelge Deller <deller@gmx.de>
Sun, 27 Aug 2023 08:33:07 +0000 (10:33 +0200)
committerHelge Deller <deller@gmx.de>
Sun, 27 Aug 2023 08:54:10 +0000 (10:54 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/processor.h
arch/parisc/kernel/setup.c
drivers/parisc/iosapic.c

index eb0ecd9..d77c43d 100644 (file)
@@ -314,7 +314,6 @@ extern int show_cpuinfo (struct seq_file *m, void *v);
 
 /* driver code in driver/parisc */
 extern void processor_init(void);
-extern void iosapic_init(void);
 struct parisc_device;
 struct resource;
 extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
index 84a1dce..fc4134b 100644 (file)
@@ -278,11 +278,6 @@ static int __init parisc_init(void)
 
        apply_alternatives_all();
        parisc_setup_cache_timing();
-
-       /* These are in a non-obvious order, will fix when we have an iotree */
-#if defined(CONFIG_IOSAPIC)
-       iosapic_init();
-#endif
        return 0;
 }
 arch_initcall(parisc_init);
index 27478e9..a7df764 100644 (file)
@@ -348,13 +348,10 @@ iosapic_load_irt(unsigned long cell_num, struct irt_entry **irt)
 }
 
 
-
-void __init iosapic_init(void)
+static int __init iosapic_init(void)
 {
        unsigned long cell = 0;
 
-       DBG("iosapic_init()\n");
-
 #ifdef __LP64__
        if (is_pdc_pat()) {
                int status;
@@ -371,7 +368,10 @@ void __init iosapic_init(void)
        irt_num_entry = iosapic_load_irt(cell, &irt_cell);
        if (irt_num_entry == 0)
                irt_cell = NULL;        /* old PDC w/o iosapic */
+
+       return 0;
 }
+arch_initcall(iosapic_init);
 
 
 /*