diff options
Diffstat (limited to 'arch')
34 files changed, 190 insertions, 200 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7f64f0464d44..de69fb37c731 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -46,10 +46,10 @@ | |||
46 | #include <asm/processor.h> | 46 | #include <asm/processor.h> |
47 | #include <asm/mmu.h> | 47 | #include <asm/mmu.h> |
48 | #include <asm/prom.h> | 48 | #include <asm/prom.h> |
49 | #include <asm/machdep.h> | ||
49 | #ifdef CONFIG_PPC64 | 50 | #ifdef CONFIG_PPC64 |
50 | #include <asm/firmware.h> | 51 | #include <asm/firmware.h> |
51 | #include <asm/time.h> | 52 | #include <asm/time.h> |
52 | #include <asm/machdep.h> | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | extern unsigned long _get_SP(void); | 55 | extern unsigned long _get_SP(void); |
@@ -203,10 +203,8 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) | |||
203 | 203 | ||
204 | int set_dabr(unsigned long dabr) | 204 | int set_dabr(unsigned long dabr) |
205 | { | 205 | { |
206 | #ifdef CONFIG_PPC64 | ||
207 | if (ppc_md.set_dabr) | 206 | if (ppc_md.set_dabr) |
208 | return ppc_md.set_dabr(dabr); | 207 | return ppc_md.set_dabr(dabr); |
209 | #endif | ||
210 | 208 | ||
211 | mtspr(SPRN_DABR, dabr); | 209 | mtspr(SPRN_DABR, dabr); |
212 | return 0; | 210 | return 0; |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index b7fc2d884950..751f5ddea913 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -608,7 +608,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
608 | return 0; | 608 | return 0; |
609 | } | 609 | } |
610 | 610 | ||
611 | #ifdef CONFIG_SMP | ||
612 | /* This version can't take the spinlock, because it never returns */ | 611 | /* This version can't take the spinlock, because it never returns */ |
613 | 612 | ||
614 | struct rtas_args rtas_stop_self_args = { | 613 | struct rtas_args rtas_stop_self_args = { |
@@ -633,7 +632,6 @@ void rtas_stop_self(void) | |||
633 | 632 | ||
634 | panic("Alas, I survived.\n"); | 633 | panic("Alas, I survived.\n"); |
635 | } | 634 | } |
636 | #endif | ||
637 | 635 | ||
638 | /* | 636 | /* |
639 | * Call early during boot, before mem init or bootmem, to retreive the RTAS | 637 | * Call early during boot, before mem init or bootmem, to retreive the RTAS |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index b0994050024f..785fd9d7b386 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/elf.h> | 41 | #include <asm/elf.h> |
42 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
43 | #include <asm/paca.h> | 43 | #include <asm/paca.h> |
44 | #include <asm/ppcdebug.h> | ||
45 | #include <asm/time.h> | 44 | #include <asm/time.h> |
46 | #include <asm/cputable.h> | 45 | #include <asm/cputable.h> |
47 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
@@ -60,6 +59,7 @@ | |||
60 | #include <asm/firmware.h> | 59 | #include <asm/firmware.h> |
61 | #include <asm/systemcfg.h> | 60 | #include <asm/systemcfg.h> |
62 | #include <asm/xmon.h> | 61 | #include <asm/xmon.h> |
62 | #include <asm/udbg.h> | ||
63 | 63 | ||
64 | #ifdef DEBUG | 64 | #ifdef DEBUG |
65 | #define DBG(fmt...) udbg_printf(fmt) | 65 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -244,12 +244,6 @@ void __init early_setup(unsigned long dt_ptr) | |||
244 | DBG(" -> early_setup()\n"); | 244 | DBG(" -> early_setup()\n"); |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * Fill the default DBG level (do we want to keep | ||
248 | * that old mecanism around forever ?) | ||
249 | */ | ||
250 | ppcdbg_initialize(); | ||
251 | |||
252 | /* | ||
253 | * Do early initializations using the flattened device | 247 | * Do early initializations using the flattened device |
254 | * tree, like retreiving the physical memory map or | 248 | * tree, like retreiving the physical memory map or |
255 | * calculating/retreiving the hash table size | 249 | * calculating/retreiving the hash table size |
@@ -521,7 +515,6 @@ void __init setup_system(void) | |||
521 | 515 | ||
522 | printk("-----------------------------------------------------\n"); | 516 | printk("-----------------------------------------------------\n"); |
523 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); | 517 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); |
524 | printk("ppc64_debug_switch = 0x%lx\n", ppc64_debug_switch); | ||
525 | printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); | 518 | printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); |
526 | printk("systemcfg = 0x%p\n", systemcfg); | 519 | printk("systemcfg = 0x%p\n", systemcfg); |
527 | printk("systemcfg->platform = 0x%x\n", systemcfg->platform); | 520 | printk("systemcfg->platform = 0x%x\n", systemcfg->platform); |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 876c57c11365..081d931eae48 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <asm/cacheflush.h> | 44 | #include <asm/cacheflush.h> |
45 | #ifdef CONFIG_PPC64 | 45 | #ifdef CONFIG_PPC64 |
46 | #include "ppc32.h" | 46 | #include "ppc32.h" |
47 | #include <asm/ppcdebug.h> | ||
48 | #include <asm/unistd.h> | 47 | #include <asm/unistd.h> |
49 | #include <asm/vdso.h> | 48 | #include <asm/vdso.h> |
50 | #else | 49 | #else |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index ec9d0984b6a0..58194e150711 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/ucontext.h> | 33 | #include <asm/ucontext.h> |
34 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/ppcdebug.h> | ||
37 | #include <asm/unistd.h> | 36 | #include <asm/unistd.h> |
38 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
39 | #include <asm/vdso.h> | 38 | #include <asm/vdso.h> |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index b1c89bc4bf90..a6282b625b44 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <asm/prom.h> | 61 | #include <asm/prom.h> |
62 | #include <asm/irq.h> | 62 | #include <asm/irq.h> |
63 | #include <asm/div64.h> | 63 | #include <asm/div64.h> |
64 | #include <asm/smp.h> | ||
64 | #ifdef CONFIG_PPC64 | 65 | #ifdef CONFIG_PPC64 |
65 | #include <asm/systemcfg.h> | 66 | #include <asm/systemcfg.h> |
66 | #include <asm/firmware.h> | 67 | #include <asm/firmware.h> |
@@ -119,10 +120,6 @@ static unsigned adjusting_time = 0; | |||
119 | unsigned long ppc_proc_freq; | 120 | unsigned long ppc_proc_freq; |
120 | unsigned long ppc_tb_freq; | 121 | unsigned long ppc_tb_freq; |
121 | 122 | ||
122 | #ifdef CONFIG_PPC32 /* XXX for now */ | ||
123 | #define boot_cpuid 0 | ||
124 | #endif | ||
125 | |||
126 | u64 tb_last_jiffy __cacheline_aligned_in_smp; | 123 | u64 tb_last_jiffy __cacheline_aligned_in_smp; |
127 | unsigned long tb_last_stamp; | 124 | unsigned long tb_last_stamp; |
128 | 125 | ||
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 2a912f411eb4..35bd03c41dd1 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 23 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) |
24 | #include <asm/hvcall.h> | 24 | #include <asm/hvcall.h> |
25 | #include <asm/iseries/hv_call.h> | 25 | #include <asm/iseries/hv_call.h> |
26 | #include <asm/smp.h> | ||
26 | 27 | ||
27 | void __spin_yield(raw_spinlock_t *lock) | 28 | void __spin_yield(raw_spinlock_t *lock) |
28 | { | 29 | { |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 841d8b6323a8..93d4fbfdb724 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -389,5 +389,22 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) | |||
389 | } | 389 | } |
390 | 390 | ||
391 | /* kernel has accessed a bad area */ | 391 | /* kernel has accessed a bad area */ |
392 | |||
393 | printk(KERN_ALERT "Unable to handle kernel paging request for "); | ||
394 | switch (regs->trap) { | ||
395 | case 0x300: | ||
396 | case 0x380: | ||
397 | printk("data at address 0x%08lx\n", regs->dar); | ||
398 | break; | ||
399 | case 0x400: | ||
400 | case 0x480: | ||
401 | printk("instruction fetch\n"); | ||
402 | break; | ||
403 | default: | ||
404 | printk("unknown fault\n"); | ||
405 | } | ||
406 | printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n", | ||
407 | regs->nip); | ||
408 | |||
392 | die("Kernel access of bad area", regs, sig); | 409 | die("Kernel access of bad area", regs, sig); |
393 | } | 410 | } |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index f15dfb92dec0..3d83c3b84f0e 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/signal.h> | 34 | #include <linux/signal.h> |
35 | 35 | ||
36 | #include <asm/ppcdebug.h> | ||
37 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
38 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
39 | #include <asm/mmu.h> | 38 | #include <asm/mmu.h> |
@@ -409,12 +408,6 @@ void __init htab_initialize(void) | |||
409 | htab_size_bytes = htab_get_table_size(); | 408 | htab_size_bytes = htab_get_table_size(); |
410 | pteg_count = htab_size_bytes >> 7; | 409 | pteg_count = htab_size_bytes >> 7; |
411 | 410 | ||
412 | /* For debug, make the HTAB 1/8 as big as it normally would be. */ | ||
413 | ifppcdebug(PPCDBG_HTABSIZE) { | ||
414 | pteg_count >>= 3; | ||
415 | htab_size_bytes = pteg_count << 7; | ||
416 | } | ||
417 | |||
418 | htab_hash_mask = pteg_count - 1; | 411 | htab_hash_mask = pteg_count - 1; |
419 | 412 | ||
420 | if (systemcfg->platform & PLATFORM_LPAR) { | 413 | if (systemcfg->platform & PLATFORM_LPAR) { |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index dfe7fa37b41a..ce974c83d88a 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
58 | #include <asm/mmzone.h> | 58 | #include <asm/mmzone.h> |
59 | #include <asm/cputable.h> | 59 | #include <asm/cputable.h> |
60 | #include <asm/ppcdebug.h> | ||
61 | #include <asm/sections.h> | 60 | #include <asm/sections.h> |
62 | #include <asm/system.h> | 61 | #include <asm/system.h> |
63 | #include <asm/iommu.h> | 62 | #include <asm/iommu.h> |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 4035cad8d7f1..da09ba03c424 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
22 | #include <asm/abs_addr.h> | 22 | #include <asm/abs_addr.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | #include <asm/smp.h> | ||
24 | 25 | ||
25 | static int numa_enabled = 1; | 26 | static int numa_enabled = 1; |
26 | 27 | ||
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 51b786940971..900842451bd3 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <asm/processor.h> | 59 | #include <asm/processor.h> |
60 | #include <asm/mmzone.h> | 60 | #include <asm/mmzone.h> |
61 | #include <asm/cputable.h> | 61 | #include <asm/cputable.h> |
62 | #include <asm/ppcdebug.h> | ||
63 | #include <asm/sections.h> | 62 | #include <asm/sections.h> |
64 | #include <asm/system.h> | 63 | #include <asm/system.h> |
65 | #include <asm/iommu.h> | 64 | #include <asm/iommu.h> |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index c1135912cc05..a06603d84a45 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | 37 | ||
38 | #include <asm/ppcdebug.h> | ||
39 | #include <asm/iseries/hv_types.h> | 38 | #include <asm/iseries/hv_types.h> |
40 | #include <asm/iseries/hv_lp_event.h> | 39 | #include <asm/iseries/hv_lp_event.h> |
41 | #include <asm/iseries/hv_call_xm.h> | 40 | #include <asm/iseries/hv_call_xm.h> |
@@ -227,8 +226,6 @@ static void iSeries_enable_IRQ(unsigned int irq) | |||
227 | /* Unmask secondary INTA */ | 226 | /* Unmask secondary INTA */ |
228 | mask = 0x80000000; | 227 | mask = 0x80000000; |
229 | HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask); | 228 | HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask); |
230 | PPCDBG(PPCDBG_BUSWALK, "iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | ||
231 | bus, subBus, deviceId, irq); | ||
232 | } | 229 | } |
233 | 230 | ||
234 | /* This is called by iSeries_activate_IRQs */ | 231 | /* This is called by iSeries_activate_IRQs */ |
@@ -310,8 +307,6 @@ static void iSeries_disable_IRQ(unsigned int irq) | |||
310 | /* Mask secondary INTA */ | 307 | /* Mask secondary INTA */ |
311 | mask = 0x80000000; | 308 | mask = 0x80000000; |
312 | HvCallPci_maskInterrupts(bus, subBus, deviceId, mask); | 309 | HvCallPci_maskInterrupts(bus, subBus, deviceId, mask); |
313 | PPCDBG(PPCDBG_BUSWALK, "iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | ||
314 | bus, subBus, deviceId, irq); | ||
315 | } | 310 | } |
316 | 311 | ||
317 | /* | 312 | /* |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 7d7d5884343f..4b75131773a6 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/prom.h> | 32 | #include <asm/prom.h> |
33 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
34 | #include <asm/pci-bridge.h> | 34 | #include <asm/pci-bridge.h> |
35 | #include <asm/ppcdebug.h> | ||
36 | #include <asm/iommu.h> | 35 | #include <asm/iommu.h> |
37 | #include <asm/abs_addr.h> | 36 | #include <asm/abs_addr.h> |
38 | 37 | ||
@@ -207,10 +206,6 @@ static struct device_node *build_device_node(HvBusNumber Bus, | |||
207 | struct device_node *node; | 206 | struct device_node *node; |
208 | struct pci_dn *pdn; | 207 | struct pci_dn *pdn; |
209 | 208 | ||
210 | PPCDBG(PPCDBG_BUSWALK, | ||
211 | "-build_device_node 0x%02X.%02X.%02X Function: %02X\n", | ||
212 | Bus, SubBus, AgentId, Function); | ||
213 | |||
214 | node = kmalloc(sizeof(struct device_node), GFP_KERNEL); | 209 | node = kmalloc(sizeof(struct device_node), GFP_KERNEL); |
215 | if (node == NULL) | 210 | if (node == NULL) |
216 | return NULL; | 211 | return NULL; |
@@ -243,8 +238,6 @@ unsigned long __init find_and_init_phbs(void) | |||
243 | struct pci_controller *phb; | 238 | struct pci_controller *phb; |
244 | HvBusNumber bus; | 239 | HvBusNumber bus; |
245 | 240 | ||
246 | PPCDBG(PPCDBG_BUSWALK, "find_and_init_phbs Entry\n"); | ||
247 | |||
248 | /* Check all possible buses. */ | 241 | /* Check all possible buses. */ |
249 | for (bus = 0; bus < 256; bus++) { | 242 | for (bus = 0; bus < 256; bus++) { |
250 | int ret = HvCallXm_testBus(bus); | 243 | int ret = HvCallXm_testBus(bus); |
@@ -261,9 +254,6 @@ unsigned long __init find_and_init_phbs(void) | |||
261 | phb->last_busno = bus; | 254 | phb->last_busno = bus; |
262 | phb->ops = &iSeries_pci_ops; | 255 | phb->ops = &iSeries_pci_ops; |
263 | 256 | ||
264 | PPCDBG(PPCDBG_BUSWALK, "PCI:Create iSeries pci_controller(%p), Bus: %04X\n", | ||
265 | phb, bus); | ||
266 | |||
267 | /* Find and connect the devices. */ | 257 | /* Find and connect the devices. */ |
268 | scan_PHB_slots(phb); | 258 | scan_PHB_slots(phb); |
269 | } | 259 | } |
@@ -285,11 +275,9 @@ unsigned long __init find_and_init_phbs(void) | |||
285 | */ | 275 | */ |
286 | void iSeries_pcibios_init(void) | 276 | void iSeries_pcibios_init(void) |
287 | { | 277 | { |
288 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); | ||
289 | iomm_table_initialize(); | 278 | iomm_table_initialize(); |
290 | find_and_init_phbs(); | 279 | find_and_init_phbs(); |
291 | io_page_mask = -1; | 280 | io_page_mask = -1; |
292 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); | ||
293 | } | 281 | } |
294 | 282 | ||
295 | /* | 283 | /* |
@@ -301,8 +289,6 @@ void __init iSeries_pci_final_fixup(void) | |||
301 | struct device_node *node; | 289 | struct device_node *node; |
302 | int DeviceCount = 0; | 290 | int DeviceCount = 0; |
303 | 291 | ||
304 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); | ||
305 | |||
306 | /* Fix up at the device node and pci_dev relationship */ | 292 | /* Fix up at the device node and pci_dev relationship */ |
307 | mf_display_src(0xC9000100); | 293 | mf_display_src(0xC9000100); |
308 | 294 | ||
@@ -316,9 +302,6 @@ void __init iSeries_pci_final_fixup(void) | |||
316 | ++DeviceCount; | 302 | ++DeviceCount; |
317 | pdev->sysdata = (void *)node; | 303 | pdev->sysdata = (void *)node; |
318 | PCI_DN(node)->pcidev = pdev; | 304 | PCI_DN(node)->pcidev = pdev; |
319 | PPCDBG(PPCDBG_BUSWALK, | ||
320 | "pdev 0x%p <==> DevNode 0x%p\n", | ||
321 | pdev, node); | ||
322 | allocate_device_bars(pdev); | 305 | allocate_device_bars(pdev); |
323 | iSeries_Device_Information(pdev, DeviceCount); | 306 | iSeries_Device_Information(pdev, DeviceCount); |
324 | iommu_devnode_init_iSeries(node); | 307 | iommu_devnode_init_iSeries(node); |
@@ -333,13 +316,10 @@ void __init iSeries_pci_final_fixup(void) | |||
333 | 316 | ||
334 | void pcibios_fixup_bus(struct pci_bus *PciBus) | 317 | void pcibios_fixup_bus(struct pci_bus *PciBus) |
335 | { | 318 | { |
336 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup_bus(0x%04X) Entry.\n", | ||
337 | PciBus->number); | ||
338 | } | 319 | } |
339 | 320 | ||
340 | void pcibios_fixup_resources(struct pci_dev *pdev) | 321 | void pcibios_fixup_resources(struct pci_dev *pdev) |
341 | { | 322 | { |
342 | PPCDBG(PPCDBG_BUSWALK, "fixup_resources pdev %p\n", pdev); | ||
343 | } | 323 | } |
344 | 324 | ||
345 | /* | 325 | /* |
@@ -401,9 +381,6 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, | |||
401 | printk("found device at bus %d idsel %d func %d (AgentId %x)\n", | 381 | printk("found device at bus %d idsel %d func %d (AgentId %x)\n", |
402 | bus, IdSel, Function, AgentId); | 382 | bus, IdSel, Function, AgentId); |
403 | /* Connect EADs: 0x18.00.12 = 0x00 */ | 383 | /* Connect EADs: 0x18.00.12 = 0x00 */ |
404 | PPCDBG(PPCDBG_BUSWALK, | ||
405 | "PCI:Connect EADs: 0x%02X.%02X.%02X\n", | ||
406 | bus, SubBus, AgentId); | ||
407 | HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, | 384 | HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, |
408 | iseries_hv_addr(BridgeInfo), | 385 | iseries_hv_addr(BridgeInfo), |
409 | sizeof(struct HvCallPci_BridgeInfo)); | 386 | sizeof(struct HvCallPci_BridgeInfo)); |
@@ -414,14 +391,6 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, | |||
414 | BridgeInfo->maxAgents, | 391 | BridgeInfo->maxAgents, |
415 | BridgeInfo->maxSubBusNumber, | 392 | BridgeInfo->maxSubBusNumber, |
416 | BridgeInfo->logicalSlotNumber); | 393 | BridgeInfo->logicalSlotNumber); |
417 | PPCDBG(PPCDBG_BUSWALK, | ||
418 | "PCI: BridgeInfo, Type:0x%02X, SubBus:0x%02X, MaxAgents:0x%02X, MaxSubBus: 0x%02X, LSlot: 0x%02X\n", | ||
419 | BridgeInfo->busUnitInfo.deviceType, | ||
420 | BridgeInfo->subBusNumber, | ||
421 | BridgeInfo->maxAgents, | ||
422 | BridgeInfo->maxSubBusNumber, | ||
423 | BridgeInfo->logicalSlotNumber); | ||
424 | |||
425 | if (BridgeInfo->busUnitInfo.deviceType == | 394 | if (BridgeInfo->busUnitInfo.deviceType == |
426 | HvCallPci_BridgeDevice) { | 395 | HvCallPci_BridgeDevice) { |
427 | /* Scan_Bridge_Slot...: 0x18.00.12 */ | 396 | /* Scan_Bridge_Slot...: 0x18.00.12 */ |
@@ -454,9 +423,6 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
454 | 423 | ||
455 | /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */ | 424 | /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */ |
456 | Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel); | 425 | Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel); |
457 | PPCDBG(PPCDBG_BUSWALK, | ||
458 | "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n", | ||
459 | Bus, 0, EADsIdSel, Irq); | ||
460 | 426 | ||
461 | /* | 427 | /* |
462 | * Connect all functions of any device found. | 428 | * Connect all functions of any device found. |
@@ -482,9 +448,6 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
482 | printk("read vendor ID: %x\n", VendorId); | 448 | printk("read vendor ID: %x\n", VendorId); |
483 | 449 | ||
484 | /* FoundDevice: 0x18.28.10 = 0x12AE */ | 450 | /* FoundDevice: 0x18.28.10 = 0x12AE */ |
485 | PPCDBG(PPCDBG_BUSWALK, | ||
486 | "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n", | ||
487 | Bus, SubBus, AgentId, VendorId, Irq); | ||
488 | HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, | 451 | HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, |
489 | PCI_INTERRUPT_LINE, Irq); | 452 | PCI_INTERRUPT_LINE, Irq); |
490 | if (HvRc != 0) | 453 | if (HvRc != 0) |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index c5207064977d..d3e4bf756c83 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -71,8 +71,6 @@ extern void hvlog(char *fmt, ...); | |||
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | /* Function Prototypes */ | 73 | /* Function Prototypes */ |
74 | extern void ppcdbg_initialize(void); | ||
75 | |||
76 | static void build_iSeries_Memory_Map(void); | 74 | static void build_iSeries_Memory_Map(void); |
77 | static void iseries_shared_idle(void); | 75 | static void iseries_shared_idle(void); |
78 | static void iseries_dedicated_idle(void); | 76 | static void iseries_dedicated_idle(void); |
@@ -309,8 +307,6 @@ static void __init iSeries_init_early(void) | |||
309 | 307 | ||
310 | ppc64_firmware_features = FW_FEATURE_ISERIES; | 308 | ppc64_firmware_features = FW_FEATURE_ISERIES; |
311 | 309 | ||
312 | ppcdbg_initialize(); | ||
313 | |||
314 | ppc64_interrupt_controller = IC_ISERIES; | 310 | ppc64_interrupt_controller = IC_ISERIES; |
315 | 311 | ||
316 | #if defined(CONFIG_BLK_DEV_INITRD) | 312 | #if defined(CONFIG_BLK_DEV_INITRD) |
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c index 3336bad67724..fcb094ec6aec 100644 --- a/arch/powerpc/platforms/iseries/smp.c +++ b/arch/powerpc/platforms/iseries/smp.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/paca.h> | 40 | #include <asm/paca.h> |
41 | #include <asm/iseries/hv_call.h> | 41 | #include <asm/iseries/hv_call.h> |
42 | #include <asm/time.h> | 42 | #include <asm/time.h> |
43 | #include <asm/ppcdebug.h> | ||
44 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
45 | #include <asm/cputable.h> | 44 | #include <asm/cputable.h> |
46 | #include <asm/system.h> | 45 | #include <asm/system.h> |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 513e27231493..fcc50bfd43fd 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
39 | #include <asm/rtas.h> | 39 | #include <asm/rtas.h> |
40 | #include <asm/ppcdebug.h> | ||
41 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
@@ -47,6 +46,7 @@ | |||
47 | #include <asm/firmware.h> | 46 | #include <asm/firmware.h> |
48 | #include <asm/tce.h> | 47 | #include <asm/tce.h> |
49 | #include <asm/ppc-pci.h> | 48 | #include <asm/ppc-pci.h> |
49 | #include <asm/udbg.h> | ||
50 | 50 | ||
51 | #include "plpar_wrappers.h" | 51 | #include "plpar_wrappers.h" |
52 | 52 | ||
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index ab0c6dd6ec94..a50e5f3f396d 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -31,13 +31,14 @@ | |||
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/abs_addr.h> | 32 | #include <asm/abs_addr.h> |
33 | #include <asm/mmu_context.h> | 33 | #include <asm/mmu_context.h> |
34 | #include <asm/ppcdebug.h> | ||
35 | #include <asm/iommu.h> | 34 | #include <asm/iommu.h> |
36 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
37 | #include <asm/tlb.h> | 36 | #include <asm/tlb.h> |
38 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
39 | #include <asm/abs_addr.h> | 38 | #include <asm/abs_addr.h> |
40 | #include <asm/cputable.h> | 39 | #include <asm/cputable.h> |
40 | #include <asm/udbg.h> | ||
41 | #include <asm/smp.h> | ||
41 | 42 | ||
42 | #include "plpar_wrappers.h" | 43 | #include "plpar_wrappers.h" |
43 | 44 | ||
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index 382f8c5b0e7c..3bd1b3e06003 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -107,14 +107,4 @@ static inline long plpar_put_term_char(unsigned long termno, unsigned long len, | |||
107 | lbuf[1]); | 107 | lbuf[1]); |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline long plpar_set_xdabr(unsigned long address, unsigned long flags) | ||
111 | { | ||
112 | return plpar_hcall_norets(H_SET_XDABR, address, flags); | ||
113 | } | ||
114 | |||
115 | static inline long plpar_set_dabr(unsigned long val) | ||
116 | { | ||
117 | return plpar_hcall_norets(H_SET_DABR, val); | ||
118 | } | ||
119 | |||
120 | #endif /* _PSERIES_PLPAR_WRAPPERS_H */ | 110 | #endif /* _PSERIES_PLPAR_WRAPPERS_H */ |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index 6562ff4b0a82..fbd214d68b07 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include <asm/ptrace.h> | 48 | #include <asm/ptrace.h> |
49 | #include <asm/machdep.h> | 49 | #include <asm/machdep.h> |
50 | #include <asm/rtas.h> | 50 | #include <asm/rtas.h> |
51 | #include <asm/ppcdebug.h> | 51 | #include <asm/udbg.h> |
52 | 52 | ||
53 | static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; | 53 | static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; |
54 | static DEFINE_SPINLOCK(ras_log_buf_lock); | 54 | static DEFINE_SPINLOCK(ras_log_buf_lock); |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 65bee939eecc..e78c39368841 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <asm/ppc-pci.h> | 65 | #include <asm/ppc-pci.h> |
66 | #include <asm/i8259.h> | 66 | #include <asm/i8259.h> |
67 | #include <asm/udbg.h> | 67 | #include <asm/udbg.h> |
68 | #include <asm/smp.h> | ||
68 | 69 | ||
69 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
70 | 71 | ||
@@ -353,14 +354,15 @@ static void pSeries_mach_cpu_die(void) | |||
353 | 354 | ||
354 | static int pseries_set_dabr(unsigned long dabr) | 355 | static int pseries_set_dabr(unsigned long dabr) |
355 | { | 356 | { |
356 | if (firmware_has_feature(FW_FEATURE_XDABR)) { | 357 | return plpar_hcall_norets(H_SET_DABR, dabr); |
357 | /* We want to catch accesses from kernel and userspace */ | ||
358 | return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER); | ||
359 | } | ||
360 | |||
361 | return plpar_set_dabr(dabr); | ||
362 | } | 358 | } |
363 | 359 | ||
360 | static int pseries_set_xdabr(unsigned long dabr) | ||
361 | { | ||
362 | /* We want to catch accesses from kernel and userspace */ | ||
363 | return plpar_hcall_norets(H_SET_XDABR, dabr, | ||
364 | H_DABRX_KERNEL | H_DABRX_USER); | ||
365 | } | ||
364 | 366 | ||
365 | /* | 367 | /* |
366 | * Early initialization. Relocation is on but do not reference unbolted pages | 368 | * Early initialization. Relocation is on but do not reference unbolted pages |
@@ -396,8 +398,10 @@ static void __init pSeries_init_early(void) | |||
396 | DBG("Hello World !\n"); | 398 | DBG("Hello World !\n"); |
397 | } | 399 | } |
398 | 400 | ||
399 | if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR)) | 401 | if (firmware_has_feature(FW_FEATURE_DABR)) |
400 | ppc_md.set_dabr = pseries_set_dabr; | 402 | ppc_md.set_dabr = pseries_set_dabr; |
403 | else if (firmware_has_feature(FW_FEATURE_XDABR)) | ||
404 | ppc_md.set_dabr = pseries_set_xdabr; | ||
401 | 405 | ||
402 | iommu_init_early_pSeries(); | 406 | iommu_init_early_pSeries(); |
403 | 407 | ||
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 90bce6e0c191..b7ac32fdd776 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -207,6 +207,9 @@ void __init i8259_init(unsigned long intack_addr, int offset) | |||
207 | 207 | ||
208 | spin_unlock_irqrestore(&i8259_lock, flags); | 208 | spin_unlock_irqrestore(&i8259_lock, flags); |
209 | 209 | ||
210 | for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) | ||
211 | irq_desc[offset + i].handler = &i8259_pic; | ||
212 | |||
210 | /* reserve our resources */ | 213 | /* reserve our resources */ |
211 | setup_irq(offset + 2, &i8259_irqaction); | 214 | setup_irq(offset + 2, &i8259_irqaction); |
212 | request_resource(&ioport_resource, &pic1_iores); | 215 | request_resource(&ioport_resource, &pic1_iores); |
@@ -216,6 +219,4 @@ void __init i8259_init(unsigned long intack_addr, int offset) | |||
216 | if (intack_addr != 0) | 219 | if (intack_addr != 0) |
217 | pci_intack = ioremap(intack_addr, 1); | 220 | pci_intack = ioremap(intack_addr, 1); |
218 | 221 | ||
219 | for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) | ||
220 | irq_desc[offset + i].handler = &i8259_pic; | ||
221 | } | 222 | } |
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c index 607722178c1a..543d65909812 100644 --- a/arch/powerpc/sysdev/u3_iommu.c +++ b/arch/powerpc/sysdev/u3_iommu.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
40 | #include <asm/ppcdebug.h> | ||
41 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index 3056ede2424d..ae6af29938a1 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -25,6 +25,11 @@ | |||
25 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
26 | #include <asm/asm-offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | #ifdef CONFIG_8xx | ||
29 | #define ISYNC_8xx isync | ||
30 | #else | ||
31 | #define ISYNC_8xx | ||
32 | #endif | ||
28 | .text | 33 | .text |
29 | 34 | ||
30 | .align 5 | 35 | .align 5 |
@@ -800,8 +805,18 @@ _GLOBAL(_insb) | |||
800 | subi r4,r4,1 | 805 | subi r4,r4,1 |
801 | blelr- | 806 | blelr- |
802 | 00: lbz r5,0(r3) | 807 | 00: lbz r5,0(r3) |
803 | eieio | 808 | 01: eieio |
804 | stbu r5,1(r4) | 809 | 02: stbu r5,1(r4) |
810 | ISYNC_8xx | ||
811 | .section .fixup,"ax" | ||
812 | 03: blr | ||
813 | .text | ||
814 | .section __ex_table, "a" | ||
815 | .align 2 | ||
816 | .long 00b, 03b | ||
817 | .long 01b, 03b | ||
818 | .long 02b, 03b | ||
819 | .text | ||
805 | bdnz 00b | 820 | bdnz 00b |
806 | blr | 821 | blr |
807 | 822 | ||
@@ -811,8 +826,18 @@ _GLOBAL(_outsb) | |||
811 | subi r4,r4,1 | 826 | subi r4,r4,1 |
812 | blelr- | 827 | blelr- |
813 | 00: lbzu r5,1(r4) | 828 | 00: lbzu r5,1(r4) |
814 | stb r5,0(r3) | 829 | 01: stb r5,0(r3) |
815 | eieio | 830 | 02: eieio |
831 | ISYNC_8xx | ||
832 | .section .fixup,"ax" | ||
833 | 03: blr | ||
834 | .text | ||
835 | .section __ex_table, "a" | ||
836 | .align 2 | ||
837 | .long 00b, 03b | ||
838 | .long 01b, 03b | ||
839 | .long 02b, 03b | ||
840 | .text | ||
816 | bdnz 00b | 841 | bdnz 00b |
817 | blr | 842 | blr |
818 | 843 | ||
@@ -822,8 +847,18 @@ _GLOBAL(_insw) | |||
822 | subi r4,r4,2 | 847 | subi r4,r4,2 |
823 | blelr- | 848 | blelr- |
824 | 00: lhbrx r5,0,r3 | 849 | 00: lhbrx r5,0,r3 |
825 | eieio | 850 | 01: eieio |
826 | sthu r5,2(r4) | 851 | 02: sthu r5,2(r4) |
852 | ISYNC_8xx | ||
853 | .section .fixup,"ax" | ||
854 | 03: blr | ||
855 | .text | ||
856 | .section __ex_table, "a" | ||
857 | .align 2 | ||
858 | .long 00b, 03b | ||
859 | .long 01b, 03b | ||
860 | .long 02b, 03b | ||
861 | .text | ||
827 | bdnz 00b | 862 | bdnz 00b |
828 | blr | 863 | blr |
829 | 864 | ||
@@ -833,8 +868,18 @@ _GLOBAL(_outsw) | |||
833 | subi r4,r4,2 | 868 | subi r4,r4,2 |
834 | blelr- | 869 | blelr- |
835 | 00: lhzu r5,2(r4) | 870 | 00: lhzu r5,2(r4) |
836 | eieio | 871 | 01: eieio |
837 | sthbrx r5,0,r3 | 872 | 02: sthbrx r5,0,r3 |
873 | ISYNC_8xx | ||
874 | .section .fixup,"ax" | ||
875 | 03: blr | ||
876 | .text | ||
877 | .section __ex_table, "a" | ||
878 | .align 2 | ||
879 | .long 00b, 03b | ||
880 | .long 01b, 03b | ||
881 | .long 02b, 03b | ||
882 | .text | ||
838 | bdnz 00b | 883 | bdnz 00b |
839 | blr | 884 | blr |
840 | 885 | ||
@@ -844,8 +889,18 @@ _GLOBAL(_insl) | |||
844 | subi r4,r4,4 | 889 | subi r4,r4,4 |
845 | blelr- | 890 | blelr- |
846 | 00: lwbrx r5,0,r3 | 891 | 00: lwbrx r5,0,r3 |
847 | eieio | 892 | 01: eieio |
848 | stwu r5,4(r4) | 893 | 02: stwu r5,4(r4) |
894 | ISYNC_8xx | ||
895 | .section .fixup,"ax" | ||
896 | 03: blr | ||
897 | .text | ||
898 | .section __ex_table, "a" | ||
899 | .align 2 | ||
900 | .long 00b, 03b | ||
901 | .long 01b, 03b | ||
902 | .long 02b, 03b | ||
903 | .text | ||
849 | bdnz 00b | 904 | bdnz 00b |
850 | blr | 905 | blr |
851 | 906 | ||
@@ -855,8 +910,18 @@ _GLOBAL(_outsl) | |||
855 | subi r4,r4,4 | 910 | subi r4,r4,4 |
856 | blelr- | 911 | blelr- |
857 | 00: lwzu r5,4(r4) | 912 | 00: lwzu r5,4(r4) |
858 | stwbrx r5,0,r3 | 913 | 01: stwbrx r5,0,r3 |
859 | eieio | 914 | 02: eieio |
915 | ISYNC_8xx | ||
916 | .section .fixup,"ax" | ||
917 | 03: blr | ||
918 | .text | ||
919 | .section __ex_table, "a" | ||
920 | .align 2 | ||
921 | .long 00b, 03b | ||
922 | .long 01b, 03b | ||
923 | .long 02b, 03b | ||
924 | .text | ||
860 | bdnz 00b | 925 | bdnz 00b |
861 | blr | 926 | blr |
862 | 927 | ||
@@ -867,8 +932,18 @@ _GLOBAL(_insw_ns) | |||
867 | subi r4,r4,2 | 932 | subi r4,r4,2 |
868 | blelr- | 933 | blelr- |
869 | 00: lhz r5,0(r3) | 934 | 00: lhz r5,0(r3) |
870 | eieio | 935 | 01: eieio |
871 | sthu r5,2(r4) | 936 | 02: sthu r5,2(r4) |
937 | ISYNC_8xx | ||
938 | .section .fixup,"ax" | ||
939 | 03: blr | ||
940 | .text | ||
941 | .section __ex_table, "a" | ||
942 | .align 2 | ||
943 | .long 00b, 03b | ||
944 | .long 01b, 03b | ||
945 | .long 02b, 03b | ||
946 | .text | ||
872 | bdnz 00b | 947 | bdnz 00b |
873 | blr | 948 | blr |
874 | 949 | ||
@@ -879,8 +954,18 @@ _GLOBAL(_outsw_ns) | |||
879 | subi r4,r4,2 | 954 | subi r4,r4,2 |
880 | blelr- | 955 | blelr- |
881 | 00: lhzu r5,2(r4) | 956 | 00: lhzu r5,2(r4) |
882 | sth r5,0(r3) | 957 | 01: sth r5,0(r3) |
883 | eieio | 958 | 02: eieio |
959 | ISYNC_8xx | ||
960 | .section .fixup,"ax" | ||
961 | 03: blr | ||
962 | .text | ||
963 | .section __ex_table, "a" | ||
964 | .align 2 | ||
965 | .long 00b, 03b | ||
966 | .long 01b, 03b | ||
967 | .long 02b, 03b | ||
968 | .text | ||
884 | bdnz 00b | 969 | bdnz 00b |
885 | blr | 970 | blr |
886 | 971 | ||
@@ -891,8 +976,18 @@ _GLOBAL(_insl_ns) | |||
891 | subi r4,r4,4 | 976 | subi r4,r4,4 |
892 | blelr- | 977 | blelr- |
893 | 00: lwz r5,0(r3) | 978 | 00: lwz r5,0(r3) |
894 | eieio | 979 | 01: eieio |
895 | stwu r5,4(r4) | 980 | 02: stwu r5,4(r4) |
981 | ISYNC_8xx | ||
982 | .section .fixup,"ax" | ||
983 | 03: blr | ||
984 | .text | ||
985 | .section __ex_table, "a" | ||
986 | .align 2 | ||
987 | .long 00b, 03b | ||
988 | .long 01b, 03b | ||
989 | .long 02b, 03b | ||
990 | .text | ||
896 | bdnz 00b | 991 | bdnz 00b |
897 | blr | 992 | blr |
898 | 993 | ||
@@ -903,8 +998,18 @@ _GLOBAL(_outsl_ns) | |||
903 | subi r4,r4,4 | 998 | subi r4,r4,4 |
904 | blelr- | 999 | blelr- |
905 | 00: lwzu r5,4(r4) | 1000 | 00: lwzu r5,4(r4) |
906 | stw r5,0(r3) | 1001 | 01: stw r5,0(r3) |
907 | eieio | 1002 | 02: eieio |
1003 | ISYNC_8xx | ||
1004 | .section .fixup,"ax" | ||
1005 | 03: blr | ||
1006 | .text | ||
1007 | .section __ex_table, "a" | ||
1008 | .align 2 | ||
1009 | .long 00b, 03b | ||
1010 | .long 01b, 03b | ||
1011 | .long 02b, 03b | ||
1012 | .text | ||
908 | bdnz 00b | 1013 | bdnz 00b |
909 | blr | 1014 | blr |
910 | 1015 | ||
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 16adde6b429d..42d980e82bdc 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -159,7 +159,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
159 | */ | 159 | */ |
160 | static inline int check_io_access(struct pt_regs *regs) | 160 | static inline int check_io_access(struct pt_regs *regs) |
161 | { | 161 | { |
162 | #ifdef CONFIG_PPC_PMAC | 162 | #if defined CONFIG_PPC_PMAC || defined CONFIG_8xx |
163 | unsigned long msr = regs->msr; | 163 | unsigned long msr = regs->msr; |
164 | const struct exception_table_entry *entry; | 164 | const struct exception_table_entry *entry; |
165 | unsigned int *nip = (unsigned int *)regs->nip; | 165 | unsigned int *nip = (unsigned int *)regs->nip; |
@@ -178,7 +178,11 @@ static inline int check_io_access(struct pt_regs *regs) | |||
178 | nip -= 2; | 178 | nip -= 2; |
179 | else if (*nip == 0x4c00012c) /* isync */ | 179 | else if (*nip == 0x4c00012c) /* isync */ |
180 | --nip; | 180 | --nip; |
181 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3) { | 181 | /* eieio from I/O string functions */ |
182 | else if ((*nip) == 0x7c0006ac || *(nip+1) == 0x7c0006ac) | ||
183 | nip += 2; | ||
184 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3 || | ||
185 | (*(nip+1) >> 26) == 3) { | ||
182 | /* sync or twi */ | 186 | /* sync or twi */ |
183 | unsigned int rb; | 187 | unsigned int rb; |
184 | 188 | ||
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index c5ac5ce5d7d2..a21632d37e5a 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <asm/io.h> | ||
17 | #include <asm/8xx_immap.h> | 18 | #include <asm/8xx_immap.h> |
18 | #include <syslib/m8xx_wdt.h> | 19 | #include <syslib/m8xx_wdt.h> |
19 | 20 | ||
@@ -29,8 +30,8 @@ void m8xx_wdt_reset(void) | |||
29 | { | 30 | { |
30 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; | 31 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; |
31 | 32 | ||
32 | out_be16(imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ | 33 | out_be16(&imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ |
33 | out_be16(imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ | 34 | out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ |
34 | } | 35 | } |
35 | 36 | ||
36 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | 37 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) |
@@ -39,7 +40,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
39 | 40 | ||
40 | m8xx_wdt_reset(); | 41 | m8xx_wdt_reset(); |
41 | 42 | ||
42 | out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS)); /* clear irq */ | 43 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ |
43 | 44 | ||
44 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
45 | } | 46 | } |
@@ -51,7 +52,7 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
51 | u32 sypcr; | 52 | u32 sypcr; |
52 | u32 pitrtclk; | 53 | u32 pitrtclk; |
53 | 54 | ||
54 | sypcr = in_be32(imap->im_siu_conf.sc_sypcr); | 55 | sypcr = in_be32(&imap->im_siu_conf.sc_sypcr); |
55 | 56 | ||
56 | if (!(sypcr & 0x04)) { | 57 | if (!(sypcr & 0x04)) { |
57 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", | 58 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", |
@@ -87,9 +88,9 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
87 | else | 88 | else |
88 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; | 89 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; |
89 | 90 | ||
90 | out_be32(imap->im_sit.sit_pitc, pitc << 16); | 91 | out_be32(&imap->im_sit.sit_pitc, pitc << 16); |
91 | 92 | ||
92 | out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); | 93 | out_be16(&imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); |
93 | 94 | ||
94 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) | 95 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) |
95 | panic("m8xx_wdt: error setting up the watchdog irq!"); | 96 | panic("m8xx_wdt: error setting up the watchdog irq!"); |
diff --git a/arch/ppc64/Kconfig.debug b/arch/ppc64/Kconfig.debug index f16a5030527b..b258c9314a1b 100644 --- a/arch/ppc64/Kconfig.debug +++ b/arch/ppc64/Kconfig.debug | |||
@@ -55,10 +55,6 @@ config XMON_DEFAULT | |||
55 | xmon is normally disabled unless booted with 'xmon=on'. | 55 | xmon is normally disabled unless booted with 'xmon=on'. |
56 | Use 'xmon=off' to disable xmon init during runtime. | 56 | Use 'xmon=off' to disable xmon init during runtime. |
57 | 57 | ||
58 | config PPCDBG | ||
59 | bool "Include PPCDBG realtime debugging" | ||
60 | depends on DEBUG_KERNEL | ||
61 | |||
62 | config IRQSTACKS | 58 | config IRQSTACKS |
63 | bool "Use separate kernel stacks when processing interrupts" | 59 | bool "Use separate kernel stacks when processing interrupts" |
64 | help | 60 | help |
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c index 8abd2ad92832..8fec27469802 100644 --- a/arch/ppc64/kernel/idle.c +++ b/arch/ppc64/kernel/idle.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/time.h> | 28 | #include <asm/time.h> |
29 | #include <asm/systemcfg.h> | 29 | #include <asm/systemcfg.h> |
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | #include <asm/smp.h> | ||
31 | 32 | ||
32 | extern void power4_idle(void); | 33 | extern void power4_idle(void); |
33 | 34 | ||
diff --git a/arch/ppc64/kernel/machine_kexec.c b/arch/ppc64/kernel/machine_kexec.c index ff8679f260f3..07ea03598c00 100644 --- a/arch/ppc64/kernel/machine_kexec.c +++ b/arch/ppc64/kernel/machine_kexec.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/mmu.h> | 24 | #include <asm/mmu.h> |
25 | #include <asm/sections.h> /* _end */ | 25 | #include <asm/sections.h> /* _end */ |
26 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
27 | #include <asm/smp.h> | ||
27 | 28 | ||
28 | #define HASH_GROUP_SIZE 0x80 /* size of each hash group, asm/mmu.h */ | 29 | #define HASH_GROUP_SIZE 0x80 /* size of each hash group, asm/mmu.h */ |
29 | 30 | ||
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index 3d2106b022a1..30247ff74972 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -295,8 +295,8 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) | |||
295 | } | 295 | } |
296 | } | 296 | } |
297 | 297 | ||
298 | static struct pci_dev *of_create_pci_dev(struct device_node *node, | 298 | struct pci_dev *of_create_pci_dev(struct device_node *node, |
299 | struct pci_bus *bus, int devfn) | 299 | struct pci_bus *bus, int devfn) |
300 | { | 300 | { |
301 | struct pci_dev *dev; | 301 | struct pci_dev *dev; |
302 | const char *type; | 302 | const char *type; |
@@ -354,10 +354,9 @@ static struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
354 | 354 | ||
355 | return dev; | 355 | return dev; |
356 | } | 356 | } |
357 | EXPORT_SYMBOL(of_create_pci_dev); | ||
357 | 358 | ||
358 | static void of_scan_pci_bridge(struct device_node *node, struct pci_dev *dev); | 359 | void __devinit of_scan_bus(struct device_node *node, |
359 | |||
360 | static void __devinit of_scan_bus(struct device_node *node, | ||
361 | struct pci_bus *bus) | 360 | struct pci_bus *bus) |
362 | { | 361 | { |
363 | struct device_node *child = NULL; | 362 | struct device_node *child = NULL; |
@@ -381,9 +380,10 @@ static void __devinit of_scan_bus(struct device_node *node, | |||
381 | 380 | ||
382 | do_bus_setup(bus); | 381 | do_bus_setup(bus); |
383 | } | 382 | } |
383 | EXPORT_SYMBOL(of_scan_bus); | ||
384 | 384 | ||
385 | static void __devinit of_scan_pci_bridge(struct device_node *node, | 385 | void __devinit of_scan_pci_bridge(struct device_node *node, |
386 | struct pci_dev *dev) | 386 | struct pci_dev *dev) |
387 | { | 387 | { |
388 | struct pci_bus *bus; | 388 | struct pci_bus *bus; |
389 | u32 *busrange, *ranges; | 389 | u32 *busrange, *ranges; |
@@ -464,9 +464,10 @@ static void __devinit of_scan_pci_bridge(struct device_node *node, | |||
464 | else if (mode == PCI_PROBE_NORMAL) | 464 | else if (mode == PCI_PROBE_NORMAL) |
465 | pci_scan_child_bus(bus); | 465 | pci_scan_child_bus(bus); |
466 | } | 466 | } |
467 | EXPORT_SYMBOL(of_scan_pci_bridge); | ||
467 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 468 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
468 | 469 | ||
469 | static void __devinit scan_phb(struct pci_controller *hose) | 470 | void __devinit scan_phb(struct pci_controller *hose) |
470 | { | 471 | { |
471 | struct pci_bus *bus; | 472 | struct pci_bus *bus; |
472 | struct device_node *node = hose->arch_data; | 473 | struct device_node *node = hose->arch_data; |
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index dece31e58bc4..0e8961dea3bc 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <asm/pgtable.h> | 46 | #include <asm/pgtable.h> |
47 | #include <asm/pci.h> | 47 | #include <asm/pci.h> |
48 | #include <asm/iommu.h> | 48 | #include <asm/iommu.h> |
49 | #include <asm/ppcdebug.h> | ||
50 | #include <asm/btext.h> | 49 | #include <asm/btext.h> |
51 | #include <asm/sections.h> | 50 | #include <asm/sections.h> |
52 | #include <asm/machdep.h> | 51 | #include <asm/machdep.h> |
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c index a4bbca6dbb8b..e72b3f9061f0 100644 --- a/arch/ppc64/kernel/prom_init.c +++ b/arch/ppc64/kernel/prom_init.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
45 | #include <asm/pci.h> | 45 | #include <asm/pci.h> |
46 | #include <asm/iommu.h> | 46 | #include <asm/iommu.h> |
47 | #include <asm/ppcdebug.h> | ||
48 | #include <asm/btext.h> | 47 | #include <asm/btext.h> |
49 | #include <asm/sections.h> | 48 | #include <asm/sections.h> |
50 | #include <asm/machdep.h> | 49 | #include <asm/machdep.h> |
diff --git a/arch/ppc64/kernel/rtas_pci.c b/arch/ppc64/kernel/rtas_pci.c index 3ad15c90fbbd..3c3f19192fcc 100644 --- a/arch/ppc64/kernel/rtas_pci.c +++ b/arch/ppc64/kernel/rtas_pci.c | |||
@@ -440,7 +440,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
440 | struct device_node *root = of_find_node_by_path("/"); | 440 | struct device_node *root = of_find_node_by_path("/"); |
441 | unsigned int root_size_cells = 0; | 441 | unsigned int root_size_cells = 0; |
442 | struct pci_controller *phb; | 442 | struct pci_controller *phb; |
443 | struct pci_bus *bus; | ||
444 | int primary; | 443 | int primary; |
445 | 444 | ||
446 | root_size_cells = prom_n_size_cells(root); | 445 | root_size_cells = prom_n_size_cells(root); |
@@ -456,10 +455,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
456 | of_node_put(root); | 455 | of_node_put(root); |
457 | 456 | ||
458 | pci_devs_phb_init_dynamic(phb); | 457 | pci_devs_phb_init_dynamic(phb); |
459 | phb->last_busno = 0xff; | 458 | scan_phb(phb); |
460 | bus = pci_scan_bus(phb->first_busno, phb->ops, phb->arch_data); | ||
461 | phb->bus = bus; | ||
462 | phb->last_busno = bus->subordinate; | ||
463 | 459 | ||
464 | return phb; | 460 | return phb; |
465 | } | 461 | } |
diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c index d49c3613c8ec..0d878e72fc44 100644 --- a/arch/ppc64/kernel/udbg.c +++ b/arch/ppc64/kernel/udbg.c | |||
@@ -10,12 +10,10 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <stdarg.h> | 12 | #include <stdarg.h> |
13 | #define WANT_PPCDBG_TAB /* Only defined here */ | ||
14 | #include <linux/config.h> | 13 | #include <linux/config.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
17 | #include <linux/console.h> | 16 | #include <linux/console.h> |
18 | #include <asm/ppcdebug.h> | ||
19 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
20 | 18 | ||
21 | void (*udbg_putc)(unsigned char c); | 19 | void (*udbg_putc)(unsigned char c); |
@@ -89,59 +87,6 @@ void udbg_printf(const char *fmt, ...) | |||
89 | va_end(args); | 87 | va_end(args); |
90 | } | 88 | } |
91 | 89 | ||
92 | /* PPCDBG stuff */ | ||
93 | |||
94 | u64 ppc64_debug_switch; | ||
95 | |||
96 | /* Special print used by PPCDBG() macro */ | ||
97 | void udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...) | ||
98 | { | ||
99 | unsigned long active_debugs = debug_flags & ppc64_debug_switch; | ||
100 | |||
101 | if (active_debugs) { | ||
102 | va_list ap; | ||
103 | unsigned char buf[UDBG_BUFSIZE]; | ||
104 | unsigned long i, len = 0; | ||
105 | |||
106 | for (i=0; i < PPCDBG_NUM_FLAGS; i++) { | ||
107 | if (((1U << i) & active_debugs) && | ||
108 | trace_names[i]) { | ||
109 | len += strlen(trace_names[i]); | ||
110 | udbg_puts(trace_names[i]); | ||
111 | break; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | snprintf(buf, UDBG_BUFSIZE, " [%s]: ", current->comm); | ||
116 | len += strlen(buf); | ||
117 | udbg_puts(buf); | ||
118 | |||
119 | while (len < 18) { | ||
120 | udbg_puts(" "); | ||
121 | len++; | ||
122 | } | ||
123 | |||
124 | va_start(ap, fmt); | ||
125 | vsnprintf(buf, UDBG_BUFSIZE, fmt, ap); | ||
126 | udbg_puts(buf); | ||
127 | va_end(ap); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | unsigned long udbg_ifdebug(unsigned long flags) | ||
132 | { | ||
133 | return (flags & ppc64_debug_switch); | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Initialize the PPCDBG state. Called before relocation has been enabled. | ||
138 | */ | ||
139 | void __init ppcdbg_initialize(void) | ||
140 | { | ||
141 | ppc64_debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */ | ||
142 | /* PPCDBG_PHBINIT | PPCDBG_MM | PPCDBG_MMINIT | PPCDBG_TCEINIT | PPCDBG_TCE */; | ||
143 | } | ||
144 | |||
145 | /* | 90 | /* |
146 | * Early boot console based on udbg | 91 | * Early boot console based on udbg |
147 | */ | 92 | */ |