diff options
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/Kconfig | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/irq.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 20 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 14 | ||||
-rw-r--r-- | arch/sparc64/mm/init.c | 2 |
5 files changed, 24 insertions, 15 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 923a98959fa7..36b4b7ab9cfb 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -231,6 +231,7 @@ endmenu | |||
231 | 231 | ||
232 | config NUMA | 232 | config NUMA |
233 | bool "NUMA support" | 233 | bool "NUMA support" |
234 | depends on SMP | ||
234 | 235 | ||
235 | config NODES_SHIFT | 236 | config NODES_SHIFT |
236 | int | 237 | int |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 9b6689d9d570..23963882bc18 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -792,6 +792,8 @@ void fixup_irqs(void) | |||
792 | } | 792 | } |
793 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 793 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); |
794 | } | 794 | } |
795 | |||
796 | tick_ops->disable_irq(); | ||
795 | } | 797 | } |
796 | #endif | 798 | #endif |
797 | 799 | ||
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index f8b50cbf4bf7..f845f150f565 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -96,7 +96,7 @@ struct of_bus { | |||
96 | int *addrc, int *sizec); | 96 | int *addrc, int *sizec); |
97 | int (*map)(u32 *addr, const u32 *range, | 97 | int (*map)(u32 *addr, const u32 *range, |
98 | int na, int ns, int pna); | 98 | int na, int ns, int pna); |
99 | unsigned int (*get_flags)(const u32 *addr); | 99 | unsigned long (*get_flags)(const u32 *addr, unsigned long); |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* | 102 | /* |
@@ -156,8 +156,10 @@ static int of_bus_default_map(u32 *addr, const u32 *range, | |||
156 | return 0; | 156 | return 0; |
157 | } | 157 | } |
158 | 158 | ||
159 | static unsigned int of_bus_default_get_flags(const u32 *addr) | 159 | static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long flags) |
160 | { | 160 | { |
161 | if (flags) | ||
162 | return flags; | ||
161 | return IORESOURCE_MEM; | 163 | return IORESOURCE_MEM; |
162 | } | 164 | } |
163 | 165 | ||
@@ -249,17 +251,21 @@ static int of_bus_pci_map(u32 *addr, const u32 *range, | |||
249 | return 0; | 251 | return 0; |
250 | } | 252 | } |
251 | 253 | ||
252 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | 254 | static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) |
253 | { | 255 | { |
254 | unsigned int flags = 0; | ||
255 | u32 w = addr[0]; | 256 | u32 w = addr[0]; |
256 | 257 | ||
258 | /* For PCI, we override whatever child busses may have used. */ | ||
259 | flags = 0; | ||
257 | switch((w >> 24) & 0x03) { | 260 | switch((w >> 24) & 0x03) { |
258 | case 0x01: | 261 | case 0x01: |
259 | flags |= IORESOURCE_IO; | 262 | flags |= IORESOURCE_IO; |
263 | break; | ||
264 | |||
260 | case 0x02: /* 32 bits */ | 265 | case 0x02: /* 32 bits */ |
261 | case 0x03: /* 64 bits */ | 266 | case 0x03: /* 64 bits */ |
262 | flags |= IORESOURCE_MEM; | 267 | flags |= IORESOURCE_MEM; |
268 | break; | ||
263 | } | 269 | } |
264 | if (w & 0x40000000) | 270 | if (w & 0x40000000) |
265 | flags |= IORESOURCE_PREFETCH; | 271 | flags |= IORESOURCE_PREFETCH; |
@@ -478,10 +484,10 @@ static void __init build_device_resources(struct of_device *op, | |||
478 | int pna, pns; | 484 | int pna, pns; |
479 | 485 | ||
480 | size = of_read_addr(reg + na, ns); | 486 | size = of_read_addr(reg + na, ns); |
481 | flags = bus->get_flags(reg); | ||
482 | |||
483 | memcpy(addr, reg, na * 4); | 487 | memcpy(addr, reg, na * 4); |
484 | 488 | ||
489 | flags = bus->get_flags(addr, 0); | ||
490 | |||
485 | if (use_1to1_mapping(pp)) { | 491 | if (use_1to1_mapping(pp)) { |
486 | result = of_read_addr(addr, na); | 492 | result = of_read_addr(addr, na); |
487 | goto build_res; | 493 | goto build_res; |
@@ -506,6 +512,8 @@ static void __init build_device_resources(struct of_device *op, | |||
506 | dna, dns, pna)) | 512 | dna, dns, pna)) |
507 | break; | 513 | break; |
508 | 514 | ||
515 | flags = pbus->get_flags(addr, flags); | ||
516 | |||
509 | dna = pna; | 517 | dna = pna; |
510 | dns = pns; | 518 | dns = pns; |
511 | dbus = pbus; | 519 | dbus = pbus; |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 743ccad61c60..2be166c544ca 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m) | |||
80 | i, cpu_data(i).clock_tick); | 80 | i, cpu_data(i).clock_tick); |
81 | } | 81 | } |
82 | 82 | ||
83 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock); | ||
84 | |||
85 | extern void setup_sparc64_timer(void); | 83 | extern void setup_sparc64_timer(void); |
86 | 84 | ||
87 | static volatile unsigned long callin_flag = 0; | 85 | static volatile unsigned long callin_flag = 0; |
@@ -120,9 +118,9 @@ void __cpuinit smp_callin(void) | |||
120 | while (!cpu_isset(cpuid, smp_commenced_mask)) | 118 | while (!cpu_isset(cpuid, smp_commenced_mask)) |
121 | rmb(); | 119 | rmb(); |
122 | 120 | ||
123 | spin_lock(&call_lock); | 121 | ipi_call_lock(); |
124 | cpu_set(cpuid, cpu_online_map); | 122 | cpu_set(cpuid, cpu_online_map); |
125 | spin_unlock(&call_lock); | 123 | ipi_call_unlock(); |
126 | 124 | ||
127 | /* idle thread is expected to have preempt disabled */ | 125 | /* idle thread is expected to have preempt disabled */ |
128 | preempt_disable(); | 126 | preempt_disable(); |
@@ -1305,10 +1303,6 @@ int __cpu_disable(void) | |||
1305 | c->core_id = 0; | 1303 | c->core_id = 0; |
1306 | c->proc_id = -1; | 1304 | c->proc_id = -1; |
1307 | 1305 | ||
1308 | spin_lock(&call_lock); | ||
1309 | cpu_clear(cpu, cpu_online_map); | ||
1310 | spin_unlock(&call_lock); | ||
1311 | |||
1312 | smp_wmb(); | 1306 | smp_wmb(); |
1313 | 1307 | ||
1314 | /* Make sure no interrupts point to this cpu. */ | 1308 | /* Make sure no interrupts point to this cpu. */ |
@@ -1318,6 +1312,10 @@ int __cpu_disable(void) | |||
1318 | mdelay(1); | 1312 | mdelay(1); |
1319 | local_irq_disable(); | 1313 | local_irq_disable(); |
1320 | 1314 | ||
1315 | ipi_call_lock(); | ||
1316 | cpu_clear(cpu, cpu_online_map); | ||
1317 | ipi_call_unlock(); | ||
1318 | |||
1321 | return 0; | 1319 | return 0; |
1322 | } | 1320 | } |
1323 | 1321 | ||
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index b4aeb0f696dc..a41df7bef035 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1843,7 +1843,7 @@ static int pavail_rescan_ents __initdata; | |||
1843 | * memory list again, and make sure it provides at least as much | 1843 | * memory list again, and make sure it provides at least as much |
1844 | * memory as 'pavail' does. | 1844 | * memory as 'pavail' does. |
1845 | */ | 1845 | */ |
1846 | static void setup_valid_addr_bitmap_from_pavail(void) | 1846 | static void __init setup_valid_addr_bitmap_from_pavail(void) |
1847 | { | 1847 | { |
1848 | int i; | 1848 | int i; |
1849 | 1849 | ||