diff options
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r-- | arch/ppc64/kernel/idle.c | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/machine_kexec.c | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci.c | 17 | ||||
-rw-r--r-- | arch/ppc64/kernel/prom.c | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/prom_init.c | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/rtas_pci.c | 6 | ||||
-rw-r--r-- | arch/ppc64/kernel/sysfs.c | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/udbg.c | 55 |
8 files changed, 13 insertions, 70 deletions
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/sysfs.c b/arch/ppc64/kernel/sysfs.c index 6654b350979c..e99ec62c2c52 100644 --- a/arch/ppc64/kernel/sysfs.c +++ b/arch/ppc64/kernel/sysfs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/paca.h> | 20 | #include <asm/paca.h> |
21 | #include <asm/lppaca.h> | 21 | #include <asm/lppaca.h> |
22 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
23 | #include <asm/smp.h> | ||
23 | 24 | ||
24 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | 25 | static DEFINE_PER_CPU(struct cpu, cpu_devices); |
25 | 26 | ||
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 | */ |