sparc32: fix build with leon or floppy enabled
authorSam Ravnborg <sam@ravnborg.org>
Sat, 26 Feb 2011 06:59:20 +0000 (22:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Mar 2011 01:19:13 +0000 (18:19 -0700)
Add a few includes back required to build with floppy enabled
Fix declaration of trapbase_cpu* so it is now consistent

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/leon.h
arch/sparc/kernel/irq_32.c
arch/sparc/kernel/kernel.h
arch/sparc/kernel/leon_smp.c

index 8580d1764f90e2a22da538c37191ac038c3e6ab2..c04f96fb753c447a2c8e0a5261ff3816497a1886 100644 (file)
@@ -375,9 +375,6 @@ void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu);
 
 extern unsigned int real_irq_entry[], smpleon_ticker[];
 extern unsigned int patchme_maybe_smp_msg[];
-extern unsigned long trapbase_cpu1[];
-extern unsigned long trapbase_cpu2[];
-extern unsigned long trapbase_cpu3[];
 extern unsigned int t_nmi[], linux_trap_ipi15_leon[];
 extern unsigned int linux_trap_ipi15_sun4m[];
 
index 974dab046a040aceb082185d190b0a726f1caa42..93afee00a9278d41d7b7a831beffb01eb4d5845b 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/seq_file.h>
 
+#include <asm/cacheflush.h>
 #include <asm/pcic.h>
 #include <asm/leon.h>
 
index 7eb7363143815fc8c965d28cfb53b956d0c0f1c0..24ad449886be4ed7ce378eb362e73df312982921 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <linux/interrupt.h>
 
+#include <asm/traps.h>
+
 /* cpu.c */
 extern const char *sparc_cpu_type;
 extern const char *sparc_pmu_type;
@@ -54,9 +56,9 @@ extern unsigned int t_nmi[];
 extern unsigned int linux_trap_ipi15_sun4d[];
 extern unsigned int linux_trap_ipi15_sun4m[];
 
-extern unsigned long trapbase_cpu1[];
-extern unsigned long trapbase_cpu2[];
-extern unsigned long trapbase_cpu3[];
+extern struct tt_entry trapbase_cpu1;
+extern struct tt_entry trapbase_cpu2;
+extern struct tt_entry trapbase_cpu3;
 
 extern char cputypval[];
 
index e9df87f4447f172df5ec69360249a5d0d1feba12..8f5de4aa3c0ab2b8b7cd8c1fad1cf8636f4cb9fa 100644 (file)
@@ -41,6 +41,8 @@
 #include <asm/leon.h>
 #include <asm/leon_amba.h>
 
+#include "kernel.h"
+
 #ifdef CONFIG_SPARC_LEON
 
 #include "irq.h"
@@ -261,23 +263,23 @@ void __init leon_smp_done(void)
 
        /* Free unneeded trap tables */
        if (!cpu_isset(1, cpu_present_map)) {
-               ClearPageReserved(virt_to_page(trapbase_cpu1));
-               init_page_count(virt_to_page(trapbase_cpu1));
-               free_page((unsigned long)trapbase_cpu1);
+               ClearPageReserved(virt_to_page(&trapbase_cpu1));
+               init_page_count(virt_to_page(&trapbase_cpu1));
+               free_page((unsigned long)&trapbase_cpu1);
                totalram_pages++;
                num_physpages++;
        }
        if (!cpu_isset(2, cpu_present_map)) {
-               ClearPageReserved(virt_to_page(trapbase_cpu2));
-               init_page_count(virt_to_page(trapbase_cpu2));
-               free_page((unsigned long)trapbase_cpu2);
+               ClearPageReserved(virt_to_page(&trapbase_cpu2));
+               init_page_count(virt_to_page(&trapbase_cpu2));
+               free_page((unsigned long)&trapbase_cpu2);
                totalram_pages++;
                num_physpages++;
        }
        if (!cpu_isset(3, cpu_present_map)) {
-               ClearPageReserved(virt_to_page(trapbase_cpu3));
-               init_page_count(virt_to_page(trapbase_cpu3));
-               free_page((unsigned long)trapbase_cpu3);
+               ClearPageReserved(virt_to_page(&trapbase_cpu3));
+               init_page_count(virt_to_page(&trapbase_cpu3));
+               free_page((unsigned long)&trapbase_cpu3);
                totalram_pages++;
                num_physpages++;
        }