Skip to content

Commit a2a211c

Browse files
sravnborgdavem330
authored andcommitted
sparc32: fix build with leon or floppy enabled
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>
1 parent 81043e8 commit a2a211c

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎arch/sparc/include/asm/leon.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@ void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu);
375375

376376
extern unsigned int real_irq_entry[], smpleon_ticker[];
377377
extern unsigned int patchme_maybe_smp_msg[];
378-
extern unsigned long trapbase_cpu1[];
379-
extern unsigned long trapbase_cpu2[];
380-
extern unsigned long trapbase_cpu3[];
381378
extern unsigned int t_nmi[], linux_trap_ipi15_leon[];
382379
extern unsigned int linux_trap_ipi15_sun4m[];
383380

‎arch/sparc/kernel/irq_32.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/kernel_stat.h>
1515
#include <linux/seq_file.h>
1616

17+
#include <asm/cacheflush.h>
1718
#include <asm/pcic.h>
1819
#include <asm/leon.h>
1920

‎arch/sparc/kernel/kernel.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#include <linux/interrupt.h>
55

6+
#include <asm/traps.h>
7+
68
/* cpu.c */
79
extern const char *sparc_cpu_type;
810
extern const char *sparc_pmu_type;
@@ -54,9 +56,9 @@ extern unsigned int t_nmi[];
5456
extern unsigned int linux_trap_ipi15_sun4d[];
5557
extern unsigned int linux_trap_ipi15_sun4m[];
5658

57-
extern unsigned long trapbase_cpu1[];
58-
extern unsigned long trapbase_cpu2[];
59-
extern unsigned long trapbase_cpu3[];
59+
extern struct tt_entry trapbase_cpu1;
60+
extern struct tt_entry trapbase_cpu2;
61+
extern struct tt_entry trapbase_cpu3;
6062

6163
extern char cputypval[];
6264

‎arch/sparc/kernel/leon_smp.c‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#include <asm/leon.h>
4242
#include <asm/leon_amba.h>
4343

44+
#include "kernel.h"
45+
4446
#ifdef CONFIG_SPARC_LEON
4547

4648
#include "irq.h"
@@ -261,23 +263,23 @@ void __init leon_smp_done(void)
261263

262264
/* Free unneeded trap tables */
263265
if (!cpu_isset(1, cpu_present_map)) {
264-
ClearPageReserved(virt_to_page(trapbase_cpu1));
265-
init_page_count(virt_to_page(trapbase_cpu1));
266-
free_page((unsigned long)trapbase_cpu1);
266+
ClearPageReserved(virt_to_page(&trapbase_cpu1));
267+
init_page_count(virt_to_page(&trapbase_cpu1));
268+
free_page((unsigned long)&trapbase_cpu1);
267269
totalram_pages++;
268270
num_physpages++;
269271
}
270272
if (!cpu_isset(2, cpu_present_map)) {
271-
ClearPageReserved(virt_to_page(trapbase_cpu2));
272-
init_page_count(virt_to_page(trapbase_cpu2));
273-
free_page((unsigned long)trapbase_cpu2);
273+
ClearPageReserved(virt_to_page(&trapbase_cpu2));
274+
init_page_count(virt_to_page(&trapbase_cpu2));
275+
free_page((unsigned long)&trapbase_cpu2);
274276
totalram_pages++;
275277
num_physpages++;
276278
}
277279
if (!cpu_isset(3, cpu_present_map)) {
278-
ClearPageReserved(virt_to_page(trapbase_cpu3));
279-
init_page_count(virt_to_page(trapbase_cpu3));
280-
free_page((unsigned long)trapbase_cpu3);
280+
ClearPageReserved(virt_to_page(&trapbase_cpu3));
281+
init_page_count(virt_to_page(&trapbase_cpu3));
282+
free_page((unsigned long)&trapbase_cpu3);
281283
totalram_pages++;
282284
num_physpages++;
283285
}

0 commit comments

Comments
 (0)