diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 01:06:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 01:06:24 -0400 |
commit | e98bae7592a44bdce2e49ccd64f3c7ffe244a0f6 (patch) | |
tree | 1887da3331c5214c330226506d229222b454e960 /arch/sparc/include | |
parent | 4b382d0643603819e8b48da58efc254cabc22574 (diff) | |
parent | f400bdb1d6de4344980cf39041497b288090dd33 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (28 commits)
sparc32: fix build, fix missing cpu_relax declaration
SCHED_TTWU_QUEUE is not longer needed since sparc32 now implements IPI
sparc32,leon: Remove unnecessary page_address calls in LEON DMA API.
sparc: convert old cpumask API into new one
sparc32, sun4d: Implemented SMP IPIs support for SUN4D machines
sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines
sparc32,leon: Implemented SMP IPIs for LEON CPU
sparc32: implement SMP IPIs using the generic functions
sparc32,leon: SMP power down implementation
sparc32,leon: added some SMP comments
sparc: add {read,write}*_be routines
sparc32,leon: don't rely on bootloader to mask IRQs
sparc32,leon: operate on boot-cpu IRQ controller registers
sparc32: always define boot_cpu_id
sparc32: removed unused code, implemented by generic code
sparc32: avoid build warning at mm/percpu.c:1647
sparc32: always register a PROM based early console
sparc32: probe for cpu info only during startup
sparc: consolidate show_cpuinfo in cpu.c
sparc32,leon: implement genirq CPU affinity
...
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/cpudata_32.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/floppy_32.h | 40 | ||||
-rw-r--r-- | arch/sparc/include/asm/io.h | 13 | ||||
-rw-r--r-- | arch/sparc/include/asm/irq_32.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/leon.h | 41 | ||||
-rw-r--r-- | arch/sparc/include/asm/pcic.h | 12 | ||||
-rw-r--r-- | arch/sparc/include/asm/pgtable_32.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/pgtable_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/setup.h | 12 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 37 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/spinlock_32.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/system_32.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/system_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/winmacro.h | 9 |
15 files changed, 123 insertions, 75 deletions
diff --git a/arch/sparc/include/asm/cpudata_32.h b/arch/sparc/include/asm/cpudata_32.h index 31d48a0e32c7..a4c5a938b936 100644 --- a/arch/sparc/include/asm/cpudata_32.h +++ b/arch/sparc/include/asm/cpudata_32.h | |||
@@ -16,6 +16,10 @@ typedef struct { | |||
16 | unsigned long clock_tick; | 16 | unsigned long clock_tick; |
17 | unsigned int multiplier; | 17 | unsigned int multiplier; |
18 | unsigned int counter; | 18 | unsigned int counter; |
19 | #ifdef CONFIG_SMP | ||
20 | unsigned int irq_resched_count; | ||
21 | unsigned int irq_call_count; | ||
22 | #endif | ||
19 | int prom_node; | 23 | int prom_node; |
20 | int mid; | 24 | int mid; |
21 | int next; | 25 | int next; |
@@ -23,5 +27,6 @@ typedef struct { | |||
23 | 27 | ||
24 | DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); | 28 | DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); |
25 | #define cpu_data(__cpu) per_cpu(__cpu_data, (__cpu)) | 29 | #define cpu_data(__cpu) per_cpu(__cpu_data, (__cpu)) |
30 | #define local_cpu_data() __get_cpu_var(__cpu_data) | ||
26 | 31 | ||
27 | #endif /* _SPARC_CPUDATA_H */ | 32 | #endif /* _SPARC_CPUDATA_H */ |
diff --git a/arch/sparc/include/asm/floppy_32.h b/arch/sparc/include/asm/floppy_32.h index 86666f70322e..482c79e2a416 100644 --- a/arch/sparc/include/asm/floppy_32.h +++ b/arch/sparc/include/asm/floppy_32.h | |||
@@ -281,28 +281,27 @@ static inline void sun_fd_enable_dma(void) | |||
281 | pdma_areasize = pdma_size; | 281 | pdma_areasize = pdma_size; |
282 | } | 282 | } |
283 | 283 | ||
284 | /* Our low-level entry point in arch/sparc/kernel/entry.S */ | 284 | extern int sparc_floppy_request_irq(unsigned int irq, |
285 | extern int sparc_floppy_request_irq(int irq, unsigned long flags, | 285 | irq_handler_t irq_handler); |
286 | irq_handler_t irq_handler); | ||
287 | 286 | ||
288 | static int sun_fd_request_irq(void) | 287 | static int sun_fd_request_irq(void) |
289 | { | 288 | { |
290 | static int once = 0; | 289 | static int once = 0; |
291 | int error; | ||
292 | 290 | ||
293 | if(!once) { | 291 | if (!once) { |
294 | once = 1; | 292 | once = 1; |
295 | error = sparc_floppy_request_irq(FLOPPY_IRQ, | 293 | return sparc_floppy_request_irq(FLOPPY_IRQ, floppy_interrupt); |
296 | IRQF_DISABLED, | 294 | } else { |
297 | floppy_interrupt); | 295 | return 0; |
298 | return ((error == 0) ? 0 : -1); | 296 | } |
299 | } else return 0; | ||
300 | } | 297 | } |
301 | 298 | ||
302 | static struct linux_prom_registers fd_regs[2]; | 299 | static struct linux_prom_registers fd_regs[2]; |
303 | 300 | ||
304 | static int sun_floppy_init(void) | 301 | static int sun_floppy_init(void) |
305 | { | 302 | { |
303 | struct platform_device *op; | ||
304 | struct device_node *dp; | ||
306 | char state[128]; | 305 | char state[128]; |
307 | phandle tnode, fd_node; | 306 | phandle tnode, fd_node; |
308 | int num_regs; | 307 | int num_regs; |
@@ -310,7 +309,6 @@ static int sun_floppy_init(void) | |||
310 | 309 | ||
311 | use_virtual_dma = 1; | 310 | use_virtual_dma = 1; |
312 | 311 | ||
313 | FLOPPY_IRQ = 11; | ||
314 | /* Forget it if we aren't on a machine that could possibly | 312 | /* Forget it if we aren't on a machine that could possibly |
315 | * ever have a floppy drive. | 313 | * ever have a floppy drive. |
316 | */ | 314 | */ |
@@ -349,6 +347,26 @@ static int sun_floppy_init(void) | |||
349 | sun_fdc = (struct sun_flpy_controller *) | 347 | sun_fdc = (struct sun_flpy_controller *) |
350 | of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy"); | 348 | of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy"); |
351 | 349 | ||
350 | /* Look up irq in platform_device. | ||
351 | * We try "SUNW,fdtwo" and "fd" | ||
352 | */ | ||
353 | for_each_node_by_name(dp, "SUNW,fdtwo") { | ||
354 | op = of_find_device_by_node(dp); | ||
355 | if (op) | ||
356 | break; | ||
357 | } | ||
358 | if (!op) { | ||
359 | for_each_node_by_name(dp, "fd") { | ||
360 | op = of_find_device_by_node(dp); | ||
361 | if (op) | ||
362 | break; | ||
363 | } | ||
364 | } | ||
365 | if (!op) | ||
366 | goto no_sun_fdc; | ||
367 | |||
368 | FLOPPY_IRQ = op->archdata.irqs[0]; | ||
369 | |||
352 | /* Last minute sanity check... */ | 370 | /* Last minute sanity check... */ |
353 | if(sun_fdc->status_82072 == 0xff) { | 371 | if(sun_fdc->status_82072 == 0xff) { |
354 | sun_fdc = NULL; | 372 | sun_fdc = NULL; |
diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h index a34b2994937a..f6902cf3cbe9 100644 --- a/arch/sparc/include/asm/io.h +++ b/arch/sparc/include/asm/io.h | |||
@@ -5,4 +5,17 @@ | |||
5 | #else | 5 | #else |
6 | #include <asm/io_32.h> | 6 | #include <asm/io_32.h> |
7 | #endif | 7 | #endif |
8 | |||
9 | /* | ||
10 | * Defines used for both SPARC32 and SPARC64 | ||
11 | */ | ||
12 | |||
13 | /* Big endian versions of memory read/write routines */ | ||
14 | #define readb_be(__addr) __raw_readb(__addr) | ||
15 | #define readw_be(__addr) __raw_readw(__addr) | ||
16 | #define readl_be(__addr) __raw_readl(__addr) | ||
17 | #define writeb_be(__b, __addr) __raw_writeb(__b, __addr) | ||
18 | #define writel_be(__w, __addr) __raw_writel(__w, __addr) | ||
19 | #define writew_be(__l, __addr) __raw_writew(__l, __addr) | ||
20 | |||
8 | #endif | 21 | #endif |
diff --git a/arch/sparc/include/asm/irq_32.h b/arch/sparc/include/asm/irq_32.h index eced3e3ebd30..2ae3acaeb1b3 100644 --- a/arch/sparc/include/asm/irq_32.h +++ b/arch/sparc/include/asm/irq_32.h | |||
@@ -6,7 +6,11 @@ | |||
6 | #ifndef _SPARC_IRQ_H | 6 | #ifndef _SPARC_IRQ_H |
7 | #define _SPARC_IRQ_H | 7 | #define _SPARC_IRQ_H |
8 | 8 | ||
9 | #define NR_IRQS 16 | 9 | /* Allocated number of logical irq numbers. |
10 | * sun4d boxes (ss2000e) should be OK with ~32. | ||
11 | * Be on the safe side and make room for 64 | ||
12 | */ | ||
13 | #define NR_IRQS 64 | ||
10 | 14 | ||
11 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
12 | 16 | ||
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index c04f96fb753c..6bdaf1e43d2a 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h | |||
@@ -52,29 +52,6 @@ | |||
52 | #define LEON_DIAGF_VALID 0x2000 | 52 | #define LEON_DIAGF_VALID 0x2000 |
53 | #define LEON_DIAGF_VALID_SHIFT 13 | 53 | #define LEON_DIAGF_VALID_SHIFT 13 |
54 | 54 | ||
55 | /* | ||
56 | * Interrupt Sources | ||
57 | * | ||
58 | * The interrupt source numbers directly map to the trap type and to | ||
59 | * the bits used in the Interrupt Clear, Interrupt Force, Interrupt Mask, | ||
60 | * and the Interrupt Pending Registers. | ||
61 | */ | ||
62 | #define LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR 1 | ||
63 | #define LEON_INTERRUPT_UART_1_RX_TX 2 | ||
64 | #define LEON_INTERRUPT_UART_0_RX_TX 3 | ||
65 | #define LEON_INTERRUPT_EXTERNAL_0 4 | ||
66 | #define LEON_INTERRUPT_EXTERNAL_1 5 | ||
67 | #define LEON_INTERRUPT_EXTERNAL_2 6 | ||
68 | #define LEON_INTERRUPT_EXTERNAL_3 7 | ||
69 | #define LEON_INTERRUPT_TIMER1 8 | ||
70 | #define LEON_INTERRUPT_TIMER2 9 | ||
71 | #define LEON_INTERRUPT_EMPTY1 10 | ||
72 | #define LEON_INTERRUPT_EMPTY2 11 | ||
73 | #define LEON_INTERRUPT_OPEN_ETH 12 | ||
74 | #define LEON_INTERRUPT_EMPTY4 13 | ||
75 | #define LEON_INTERRUPT_EMPTY5 14 | ||
76 | #define LEON_INTERRUPT_EMPTY6 15 | ||
77 | |||
78 | /* irq masks */ | 55 | /* irq masks */ |
79 | #define LEON_HARD_INT(x) (1 << (x)) /* irq 0-15 */ | 56 | #define LEON_HARD_INT(x) (1 << (x)) /* irq 0-15 */ |
80 | #define LEON_IRQMASK_R 0x0000fffe /* bit 15- 1 of lregs.irqmask */ | 57 | #define LEON_IRQMASK_R 0x0000fffe /* bit 15- 1 of lregs.irqmask */ |
@@ -183,7 +160,6 @@ static inline void leon_srmmu_enabletlb(void) | |||
183 | /* macro access for leon_readnobuffer_reg() */ | 160 | /* macro access for leon_readnobuffer_reg() */ |
184 | #define LEON_BYPASSCACHE_LOAD_VA(x) leon_readnobuffer_reg((unsigned long)(x)) | 161 | #define LEON_BYPASSCACHE_LOAD_VA(x) leon_readnobuffer_reg((unsigned long)(x)) |
185 | 162 | ||
186 | extern void sparc_leon_eirq_register(int eirq); | ||
187 | extern void leon_init(void); | 163 | extern void leon_init(void); |
188 | extern void leon_switch_mm(void); | 164 | extern void leon_switch_mm(void); |
189 | extern void leon_init_IRQ(void); | 165 | extern void leon_init_IRQ(void); |
@@ -239,8 +215,8 @@ static inline int sparc_leon3_cpuid(void) | |||
239 | #endif /*!__ASSEMBLY__*/ | 215 | #endif /*!__ASSEMBLY__*/ |
240 | 216 | ||
241 | #ifdef CONFIG_SMP | 217 | #ifdef CONFIG_SMP |
242 | # define LEON3_IRQ_RESCHEDULE 13 | 218 | # define LEON3_IRQ_IPI_DEFAULT 13 |
243 | # define LEON3_IRQ_TICKER (leon_percpu_timer_dev[0].irq) | 219 | # define LEON3_IRQ_TICKER (leon3_ticker_irq) |
244 | # define LEON3_IRQ_CROSS_CALL 15 | 220 | # define LEON3_IRQ_CROSS_CALL 15 |
245 | #endif | 221 | #endif |
246 | 222 | ||
@@ -339,9 +315,9 @@ struct leon2_cacheregs { | |||
339 | #include <linux/interrupt.h> | 315 | #include <linux/interrupt.h> |
340 | 316 | ||
341 | struct device_node; | 317 | struct device_node; |
342 | extern int sparc_leon_eirq_get(int eirq, int cpu); | 318 | extern unsigned int leon_build_device_irq(unsigned int real_irq, |
343 | extern irqreturn_t sparc_leon_eirq_isr(int dummy, void *dev_id); | 319 | irq_flow_handler_t flow_handler, |
344 | extern void sparc_leon_eirq_register(int eirq); | 320 | const char *name, int do_ack); |
345 | extern void leon_clear_clock_irq(void); | 321 | extern void leon_clear_clock_irq(void); |
346 | extern void leon_load_profile_irq(int cpu, unsigned int limit); | 322 | extern void leon_load_profile_irq(int cpu, unsigned int limit); |
347 | extern void leon_init_timers(irq_handler_t counter_fn); | 323 | extern void leon_init_timers(irq_handler_t counter_fn); |
@@ -358,6 +334,7 @@ extern void leon3_getCacheRegs(struct leon3_cacheregs *regs); | |||
358 | extern int leon_flush_needed(void); | 334 | extern int leon_flush_needed(void); |
359 | extern void leon_switch_mm(void); | 335 | extern void leon_switch_mm(void); |
360 | extern int srmmu_swprobe_trace; | 336 | extern int srmmu_swprobe_trace; |
337 | extern int leon3_ticker_irq; | ||
361 | 338 | ||
362 | #ifdef CONFIG_SMP | 339 | #ifdef CONFIG_SMP |
363 | extern int leon_smp_nrcpus(void); | 340 | extern int leon_smp_nrcpus(void); |
@@ -366,17 +343,19 @@ extern void leon_smp_done(void); | |||
366 | extern void leon_boot_cpus(void); | 343 | extern void leon_boot_cpus(void); |
367 | extern int leon_boot_one_cpu(int i); | 344 | extern int leon_boot_one_cpu(int i); |
368 | void leon_init_smp(void); | 345 | void leon_init_smp(void); |
369 | extern void cpu_probe(void); | ||
370 | extern void cpu_idle(void); | 346 | extern void cpu_idle(void); |
371 | extern void init_IRQ(void); | 347 | extern void init_IRQ(void); |
372 | extern void cpu_panic(void); | 348 | extern void cpu_panic(void); |
373 | extern int __leon_processor_id(void); | 349 | extern int __leon_processor_id(void); |
374 | void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu); | 350 | void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu); |
351 | extern irqreturn_t leon_percpu_timer_interrupt(int irq, void *unused); | ||
375 | 352 | ||
376 | extern unsigned int real_irq_entry[], smpleon_ticker[]; | 353 | extern unsigned int real_irq_entry[]; |
354 | extern unsigned int smpleon_ipi[]; | ||
377 | extern unsigned int patchme_maybe_smp_msg[]; | 355 | extern unsigned int patchme_maybe_smp_msg[]; |
378 | extern unsigned int t_nmi[], linux_trap_ipi15_leon[]; | 356 | extern unsigned int t_nmi[], linux_trap_ipi15_leon[]; |
379 | extern unsigned int linux_trap_ipi15_sun4m[]; | 357 | extern unsigned int linux_trap_ipi15_sun4m[]; |
358 | extern int leon_ipi_irq; | ||
380 | 359 | ||
381 | #endif /* CONFIG_SMP */ | 360 | #endif /* CONFIG_SMP */ |
382 | 361 | ||
diff --git a/arch/sparc/include/asm/pcic.h b/arch/sparc/include/asm/pcic.h index f20ef562b265..7eb5d78f5211 100644 --- a/arch/sparc/include/asm/pcic.h +++ b/arch/sparc/include/asm/pcic.h | |||
@@ -29,11 +29,17 @@ struct linux_pcic { | |||
29 | int pcic_imdim; | 29 | int pcic_imdim; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | extern int pcic_probe(void); | 32 | #ifdef CONFIG_PCI |
33 | /* Erm... MJ redefined pcibios_present() so that it does not work early. */ | ||
34 | extern int pcic_present(void); | 33 | extern int pcic_present(void); |
34 | extern int pcic_probe(void); | ||
35 | extern void pci_time_init(void); | ||
35 | extern void sun4m_pci_init_IRQ(void); | 36 | extern void sun4m_pci_init_IRQ(void); |
36 | 37 | #else | |
38 | static inline int pcic_present(void) { return 0; } | ||
39 | static inline int pcic_probe(void) { return 0; } | ||
40 | static inline void pci_time_init(void) {} | ||
41 | static inline void sun4m_pci_init_IRQ(void) {} | ||
42 | #endif | ||
37 | #endif | 43 | #endif |
38 | 44 | ||
39 | /* Size of PCI I/O space which we relocate. */ | 45 | /* Size of PCI I/O space which we relocate. */ |
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 303bd4dc8292..5b31a8e89823 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h | |||
@@ -8,6 +8,8 @@ | |||
8 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 8 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/const.h> | ||
12 | |||
11 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
12 | #include <asm-generic/4level-fixup.h> | 14 | #include <asm-generic/4level-fixup.h> |
13 | 15 | ||
@@ -456,9 +458,9 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, | |||
456 | 458 | ||
457 | #endif /* !(__ASSEMBLY__) */ | 459 | #endif /* !(__ASSEMBLY__) */ |
458 | 460 | ||
459 | #define VMALLOC_START 0xfe600000 | 461 | #define VMALLOC_START _AC(0xfe600000,UL) |
460 | /* XXX Alter this when I get around to fixing sun4c - Anton */ | 462 | /* XXX Alter this when I get around to fixing sun4c - Anton */ |
461 | #define VMALLOC_END 0xffc00000 | 463 | #define VMALLOC_END _AC(0xffc00000,UL) |
462 | 464 | ||
463 | 465 | ||
464 | /* We provide our own get_unmapped_area to cope with VA holes for userland */ | 466 | /* We provide our own get_unmapped_area to cope with VA holes for userland */ |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index f8dddb7045bb..b77128c80524 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -699,6 +699,9 @@ extern pmd_t swapper_low_pmd_dir[2048]; | |||
699 | extern void paging_init(void); | 699 | extern void paging_init(void); |
700 | extern unsigned long find_ecache_flush_span(unsigned long size); | 700 | extern unsigned long find_ecache_flush_span(unsigned long size); |
701 | 701 | ||
702 | struct seq_file; | ||
703 | extern void mmu_info(struct seq_file *); | ||
704 | |||
702 | /* These do nothing with the way I have things setup. */ | 705 | /* These do nothing with the way I have things setup. */ |
703 | #define mmu_lockarea(vaddr, len) (vaddr) | 706 | #define mmu_lockarea(vaddr, len) (vaddr) |
704 | #define mmu_unlockarea(vaddr, len) do { } while(0) | 707 | #define mmu_unlockarea(vaddr, len) do { } while(0) |
diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h index 2643c62f4ac0..64718ba26434 100644 --- a/arch/sparc/include/asm/setup.h +++ b/arch/sparc/include/asm/setup.h | |||
@@ -11,4 +11,16 @@ | |||
11 | # define COMMAND_LINE_SIZE 256 | 11 | # define COMMAND_LINE_SIZE 256 |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #ifdef CONFIG_SPARC32 | ||
17 | /* The CPU that was used for booting | ||
18 | * Only sun4d + leon may have boot_cpu_id != 0 | ||
19 | */ | ||
20 | extern unsigned char boot_cpu_id; | ||
21 | extern unsigned char boot_cpu_id4; | ||
22 | #endif | ||
23 | |||
24 | #endif /* __KERNEL__ */ | ||
25 | |||
14 | #endif /* _SPARC_SETUP_H */ | 26 | #endif /* _SPARC_SETUP_H */ |
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index d82d7f4c0a79..093f10843ff2 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -50,42 +50,38 @@ void smp_callin(void); | |||
50 | void smp_boot_cpus(void); | 50 | void smp_boot_cpus(void); |
51 | void smp_store_cpu_info(int); | 51 | void smp_store_cpu_info(int); |
52 | 52 | ||
53 | void smp_resched_interrupt(void); | ||
54 | void smp_call_function_single_interrupt(void); | ||
55 | void smp_call_function_interrupt(void); | ||
56 | |||
53 | struct seq_file; | 57 | struct seq_file; |
54 | void smp_bogo(struct seq_file *); | 58 | void smp_bogo(struct seq_file *); |
55 | void smp_info(struct seq_file *); | 59 | void smp_info(struct seq_file *); |
56 | 60 | ||
57 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, cpumask_t, unsigned long, unsigned long, unsigned long, unsigned long) | 61 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, cpumask_t, unsigned long, unsigned long, unsigned long, unsigned long) |
58 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) | 62 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) |
63 | BTFIXUPDEF_CALL(void, smp_ipi_resched, int); | ||
64 | BTFIXUPDEF_CALL(void, smp_ipi_single, int); | ||
65 | BTFIXUPDEF_CALL(void, smp_ipi_mask_one, int); | ||
59 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) | 66 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) |
60 | BTFIXUPDEF_BLACKBOX(load_current) | 67 | BTFIXUPDEF_BLACKBOX(load_current) |
61 | 68 | ||
62 | #define smp_cross_call(func,mask,arg1,arg2,arg3,arg4) BTFIXUP_CALL(smp_cross_call)(func,mask,arg1,arg2,arg3,arg4) | 69 | #define smp_cross_call(func,mask,arg1,arg2,arg3,arg4) BTFIXUP_CALL(smp_cross_call)(func,mask,arg1,arg2,arg3,arg4) |
63 | 70 | ||
64 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, cpu_online_map, 0, 0, 0, 0); } | 71 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, *cpu_online_mask, 0, 0, 0, 0); } |
65 | static inline void xc1(smpfunc_t func, unsigned long arg1) | 72 | static inline void xc1(smpfunc_t func, unsigned long arg1) |
66 | { smp_cross_call(func, cpu_online_map, arg1, 0, 0, 0); } | 73 | { smp_cross_call(func, *cpu_online_mask, arg1, 0, 0, 0); } |
67 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) | 74 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) |
68 | { smp_cross_call(func, cpu_online_map, arg1, arg2, 0, 0); } | 75 | { smp_cross_call(func, *cpu_online_mask, arg1, arg2, 0, 0); } |
69 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 76 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
70 | unsigned long arg3) | 77 | unsigned long arg3) |
71 | { smp_cross_call(func, cpu_online_map, arg1, arg2, arg3, 0); } | 78 | { smp_cross_call(func, *cpu_online_mask, arg1, arg2, arg3, 0); } |
72 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 79 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
73 | unsigned long arg3, unsigned long arg4) | 80 | unsigned long arg3, unsigned long arg4) |
74 | { smp_cross_call(func, cpu_online_map, arg1, arg2, arg3, arg4); } | 81 | { smp_cross_call(func, *cpu_online_mask, arg1, arg2, arg3, arg4); } |
75 | |||
76 | static inline int smp_call_function(void (*func)(void *info), void *info, int wait) | ||
77 | { | ||
78 | xc1((smpfunc_t)func, (unsigned long)info); | ||
79 | return 0; | ||
80 | } | ||
81 | 82 | ||
82 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | 83 | extern void arch_send_call_function_single_ipi(int cpu); |
83 | void *info, int wait) | 84 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
84 | { | ||
85 | smp_cross_call((smpfunc_t)func, cpumask_of_cpu(cpuid), | ||
86 | (unsigned long) info, 0, 0, 0); | ||
87 | return 0; | ||
88 | } | ||
89 | 85 | ||
90 | static inline int cpu_logical_map(int cpu) | 86 | static inline int cpu_logical_map(int cpu) |
91 | { | 87 | { |
@@ -135,6 +131,11 @@ static inline int hard_smp_processor_id(void) | |||
135 | __asm__ __volatile__("lda [%g0] ASI_M_VIKING_TMP1, %0\n\t" | 131 | __asm__ __volatile__("lda [%g0] ASI_M_VIKING_TMP1, %0\n\t" |
136 | "nop; nop" : | 132 | "nop; nop" : |
137 | "=&r" (cpuid)); | 133 | "=&r" (cpuid)); |
134 | - leon | ||
135 | __asm__ __volatile__( "rd %asr17, %0\n\t" | ||
136 | "srl %0, 0x1c, %0\n\t" | ||
137 | "nop\n\t" : | ||
138 | "=&r" (cpuid)); | ||
138 | See btfixup.h and btfixupprep.c to understand how a blackbox works. | 139 | See btfixup.h and btfixupprep.c to understand how a blackbox works. |
139 | */ | 140 | */ |
140 | __asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t" | 141 | __asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t" |
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h index f49e11cd4ded..20bca8950710 100644 --- a/arch/sparc/include/asm/smp_64.h +++ b/arch/sparc/include/asm/smp_64.h | |||
@@ -49,6 +49,10 @@ extern void cpu_play_dead(void); | |||
49 | 49 | ||
50 | extern void smp_fetch_global_regs(void); | 50 | extern void smp_fetch_global_regs(void); |
51 | 51 | ||
52 | struct seq_file; | ||
53 | void smp_bogo(struct seq_file *); | ||
54 | void smp_info(struct seq_file *); | ||
55 | |||
52 | #ifdef CONFIG_HOTPLUG_CPU | 56 | #ifdef CONFIG_HOTPLUG_CPU |
53 | extern int __cpu_disable(void); | 57 | extern int __cpu_disable(void); |
54 | extern void __cpu_die(unsigned int cpu); | 58 | extern void __cpu_die(unsigned int cpu); |
diff --git a/arch/sparc/include/asm/spinlock_32.h b/arch/sparc/include/asm/spinlock_32.h index 7f9b9dba38a6..5f5b8bf3f50d 100644 --- a/arch/sparc/include/asm/spinlock_32.h +++ b/arch/sparc/include/asm/spinlock_32.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
10 | 10 | ||
11 | #include <asm/psr.h> | 11 | #include <asm/psr.h> |
12 | #include <asm/processor.h> /* for cpu_relax */ | ||
12 | 13 | ||
13 | #define arch_spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0) | 14 | #define arch_spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0) |
14 | 15 | ||
diff --git a/arch/sparc/include/asm/system_32.h b/arch/sparc/include/asm/system_32.h index 890036b3689a..47a7e862474e 100644 --- a/arch/sparc/include/asm/system_32.h +++ b/arch/sparc/include/asm/system_32.h | |||
@@ -15,11 +15,6 @@ | |||
15 | 15 | ||
16 | #include <linux/irqflags.h> | 16 | #include <linux/irqflags.h> |
17 | 17 | ||
18 | static inline unsigned int probe_irq_mask(unsigned long val) | ||
19 | { | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | /* | 18 | /* |
24 | * Sparc (general) CPU types | 19 | * Sparc (general) CPU types |
25 | */ | 20 | */ |
diff --git a/arch/sparc/include/asm/system_64.h b/arch/sparc/include/asm/system_64.h index e3b65d8cf41b..3c96d3bb9f15 100644 --- a/arch/sparc/include/asm/system_64.h +++ b/arch/sparc/include/asm/system_64.h | |||
@@ -29,10 +29,6 @@ enum sparc_cpu { | |||
29 | /* This cannot ever be a sun4c :) That's just history. */ | 29 | /* This cannot ever be a sun4c :) That's just history. */ |
30 | #define ARCH_SUN4C 0 | 30 | #define ARCH_SUN4C 0 |
31 | 31 | ||
32 | extern const char *sparc_cpu_type; | ||
33 | extern const char *sparc_fpu_type; | ||
34 | extern const char *sparc_pmu_type; | ||
35 | |||
36 | extern char reboot_command[]; | 32 | extern char reboot_command[]; |
37 | 33 | ||
38 | /* These are here in an effort to more fully work around Spitfire Errata | 34 | /* These are here in an effort to more fully work around Spitfire Errata |
diff --git a/arch/sparc/include/asm/winmacro.h b/arch/sparc/include/asm/winmacro.h index 5b0a06dc3bcb..a9be04b0d049 100644 --- a/arch/sparc/include/asm/winmacro.h +++ b/arch/sparc/include/asm/winmacro.h | |||
@@ -103,6 +103,7 @@ | |||
103 | st %scratch, [%cur_reg + TI_W_SAVED]; | 103 | st %scratch, [%cur_reg + TI_W_SAVED]; |
104 | 104 | ||
105 | #ifdef CONFIG_SMP | 105 | #ifdef CONFIG_SMP |
106 | /* Results of LOAD_CURRENT() after BTFIXUP for SUN4M, SUN4D & LEON (comments) */ | ||
106 | #define LOAD_CURRENT4M(dest_reg, idreg) \ | 107 | #define LOAD_CURRENT4M(dest_reg, idreg) \ |
107 | rd %tbr, %idreg; \ | 108 | rd %tbr, %idreg; \ |
108 | sethi %hi(current_set), %dest_reg; \ | 109 | sethi %hi(current_set), %dest_reg; \ |
@@ -118,6 +119,14 @@ | |||
118 | or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ | 119 | or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ |
119 | ld [%idreg + %dest_reg], %dest_reg; | 120 | ld [%idreg + %dest_reg], %dest_reg; |
120 | 121 | ||
122 | #define LOAD_CURRENT_LEON(dest_reg, idreg) \ | ||
123 | rd %asr17, %idreg; \ | ||
124 | sethi %hi(current_set), %dest_reg; \ | ||
125 | srl %idreg, 0x1c, %idreg; \ | ||
126 | or %dest_reg, %lo(current_set), %dest_reg; \ | ||
127 | sll %idreg, 0x2, %idreg; \ | ||
128 | ld [%idreg + %dest_reg], %dest_reg; | ||
129 | |||
121 | /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */ | 130 | /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */ |
122 | #define LOAD_CURRENT(dest_reg, idreg) \ | 131 | #define LOAD_CURRENT(dest_reg, idreg) \ |
123 | sethi %hi(___b_load_current), %idreg; \ | 132 | sethi %hi(___b_load_current), %idreg; \ |