diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/Makefile | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash_dump.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 60 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg.c | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg_16550.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso32/.gitignore | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso64/.gitignore | 1 |
11 files changed, 73 insertions, 45 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 144e284d21dd..bbfa1bdceb4d 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -61,9 +61,9 @@ obj-$(CONFIG_MODULES) += $(module-y) | |||
61 | pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ | 61 | pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ |
62 | pci_direct_iommu.o iomap.o | 62 | pci_direct_iommu.o iomap.o |
63 | obj-$(CONFIG_PCI) += $(pci64-y) | 63 | obj-$(CONFIG_PCI) += $(pci64-y) |
64 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o | 64 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o |
65 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o | 65 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o |
66 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) | 66 | obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y) |
67 | 67 | ||
68 | ifeq ($(CONFIG_PPC_ISERIES),y) | 68 | ifeq ($(CONFIG_PPC_ISERIES),y) |
69 | $(obj)/head_64.o: $(obj)/lparmap.s | 69 | $(obj)/head_64.o: $(obj)/lparmap.s |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 4681155121ef..5f248e3fdf82 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/kexec.h> | 18 | #include <linux/kexec.h> |
19 | #include <linux/bootmem.h> | 19 | #include <linux/bootmem.h> |
20 | #include <linux/crash_dump.h> | 20 | #include <linux/crash_dump.h> |
21 | #include <linux/irq.h> | ||
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/elf.h> | 22 | #include <linux/elf.h> |
24 | #include <linux/elfcore.h> | 23 | #include <linux/elfcore.h> |
@@ -30,6 +29,7 @@ | |||
30 | #include <asm/kdump.h> | 29 | #include <asm/kdump.h> |
31 | #include <asm/lmb.h> | 30 | #include <asm/lmb.h> |
32 | #include <asm/firmware.h> | 31 | #include <asm/firmware.h> |
32 | #include <asm/smp.h> | ||
33 | 33 | ||
34 | #ifdef DEBUG | 34 | #ifdef DEBUG |
35 | #include <asm/udbg.h> | 35 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 87effa3f21a7..211d72653ea6 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -55,6 +55,7 @@ void __init kdump_setup(void) | |||
55 | DBG(" <- kdump_setup()\n"); | 55 | DBG(" <- kdump_setup()\n"); |
56 | } | 56 | } |
57 | 57 | ||
58 | #ifdef CONFIG_PROC_VMCORE | ||
58 | static int __init parse_elfcorehdr(char *p) | 59 | static int __init parse_elfcorehdr(char *p) |
59 | { | 60 | { |
60 | if (p) | 61 | if (p) |
@@ -63,6 +64,7 @@ static int __init parse_elfcorehdr(char *p) | |||
63 | return 0; | 64 | return 0; |
64 | } | 65 | } |
65 | __setup("elfcorehdr=", parse_elfcorehdr); | 66 | __setup("elfcorehdr=", parse_elfcorehdr); |
67 | #endif | ||
66 | 68 | ||
67 | static int __init parse_savemaxmem(char *p) | 69 | static int __init parse_savemaxmem(char *p) |
68 | { | 70 | { |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index a91e40c9ae45..a81ca1b841ec 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -14,12 +14,6 @@ | |||
14 | #include <linux/threads.h> | 14 | #include <linux/threads.h> |
15 | #include <asm/machdep.h> | 15 | #include <asm/machdep.h> |
16 | 16 | ||
17 | /* | ||
18 | * Provide a dummy crash_notes definition until crash dump is implemented. | ||
19 | * This prevents breakage of crash_notes attribute in kernel/ksysfs.c. | ||
20 | */ | ||
21 | note_buf_t crash_notes[NR_CPUS]; | ||
22 | |||
23 | void machine_crash_shutdown(struct pt_regs *regs) | 17 | void machine_crash_shutdown(struct pt_regs *regs) |
24 | { | 18 | { |
25 | if (ppc_md.machine_crash_shutdown) | 19 | if (ppc_md.machine_crash_shutdown) |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index ba21a6c4f467..24fe70f40b66 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -271,6 +271,9 @@ void __devinit pcibios_claim_one_bus(struct pci_bus *b) | |||
271 | list_for_each_entry(child_bus, &b->children, node) | 271 | list_for_each_entry(child_bus, &b->children, node) |
272 | pcibios_claim_one_bus(child_bus); | 272 | pcibios_claim_one_bus(child_bus); |
273 | } | 273 | } |
274 | #ifdef CONFIG_HOTPLUG | ||
275 | EXPORT_SYMBOL_GPL(pcibios_claim_one_bus); | ||
276 | #endif | ||
274 | 277 | ||
275 | #ifndef CONFIG_PPC_ISERIES | 278 | #ifndef CONFIG_PPC_ISERIES |
276 | static void __init pcibios_claim_of_setup(void) | 279 | static void __init pcibios_claim_of_setup(void) |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index ae2e2a31a705..68bcd2824bc6 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/delay.h> | 29 | #include <asm/delay.h> |
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
31 | #include <asm/lmb.h> | 31 | #include <asm/lmb.h> |
32 | #include <asm/udbg.h> | ||
32 | 33 | ||
33 | struct rtas_t rtas = { | 34 | struct rtas_t rtas = { |
34 | .lock = SPIN_LOCK_UNLOCKED | 35 | .lock = SPIN_LOCK_UNLOCKED |
@@ -52,7 +53,7 @@ EXPORT_SYMBOL(rtas_flash_term_hook); | |||
52 | * are designed only for very early low-level debugging, which | 53 | * are designed only for very early low-level debugging, which |
53 | * is why the token is hard-coded to 10. | 54 | * is why the token is hard-coded to 10. |
54 | */ | 55 | */ |
55 | void call_rtas_display_status(unsigned char c) | 56 | static void call_rtas_display_status(char c) |
56 | { | 57 | { |
57 | struct rtas_args *args = &rtas.args; | 58 | struct rtas_args *args = &rtas.args; |
58 | unsigned long s; | 59 | unsigned long s; |
@@ -65,14 +66,14 @@ void call_rtas_display_status(unsigned char c) | |||
65 | args->nargs = 1; | 66 | args->nargs = 1; |
66 | args->nret = 1; | 67 | args->nret = 1; |
67 | args->rets = (rtas_arg_t *)&(args->args[1]); | 68 | args->rets = (rtas_arg_t *)&(args->args[1]); |
68 | args->args[0] = (int)c; | 69 | args->args[0] = (unsigned char)c; |
69 | 70 | ||
70 | enter_rtas(__pa(args)); | 71 | enter_rtas(__pa(args)); |
71 | 72 | ||
72 | spin_unlock_irqrestore(&rtas.lock, s); | 73 | spin_unlock_irqrestore(&rtas.lock, s); |
73 | } | 74 | } |
74 | 75 | ||
75 | void call_rtas_display_status_delay(unsigned char c) | 76 | static void call_rtas_display_status_delay(char c) |
76 | { | 77 | { |
77 | static int pending_newline = 0; /* did last write end with unprinted newline? */ | 78 | static int pending_newline = 0; /* did last write end with unprinted newline? */ |
78 | static int width = 16; | 79 | static int width = 16; |
@@ -96,6 +97,11 @@ void call_rtas_display_status_delay(unsigned char c) | |||
96 | } | 97 | } |
97 | } | 98 | } |
98 | 99 | ||
100 | void __init udbg_init_rtas(void) | ||
101 | { | ||
102 | udbg_putc = call_rtas_display_status_delay; | ||
103 | } | ||
104 | |||
99 | void rtas_progress(char *s, unsigned short hex) | 105 | void rtas_progress(char *s, unsigned short hex) |
100 | { | 106 | { |
101 | struct device_node *root; | 107 | struct device_node *root; |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index c4b76961d6de..e29b275e09e0 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/unistd.h> | 33 | #include <linux/unistd.h> |
34 | #include <linux/serial.h> | 34 | #include <linux/serial.h> |
35 | #include <linux/serial_8250.h> | 35 | #include <linux/serial_8250.h> |
36 | #include <linux/bootmem.h> | ||
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
37 | #include <asm/kdump.h> | 38 | #include <asm/kdump.h> |
38 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
@@ -70,33 +71,6 @@ | |||
70 | #define DBG(fmt...) | 71 | #define DBG(fmt...) |
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | /* | ||
74 | * Here are some early debugging facilities. You can enable one | ||
75 | * but your kernel will not boot on anything else if you do so | ||
76 | */ | ||
77 | |||
78 | /* This one is for use on LPAR machines that support an HVC console | ||
79 | * on vterm 0 | ||
80 | */ | ||
81 | extern void udbg_init_debug_lpar(void); | ||
82 | /* This one is for use on Apple G5 machines | ||
83 | */ | ||
84 | extern void udbg_init_pmac_realmode(void); | ||
85 | /* That's RTAS panel debug */ | ||
86 | extern void call_rtas_display_status_delay(unsigned char c); | ||
87 | /* Here's maple real mode debug */ | ||
88 | extern void udbg_init_maple_realmode(void); | ||
89 | |||
90 | #define EARLY_DEBUG_INIT() do {} while(0) | ||
91 | |||
92 | #if 0 | ||
93 | #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() | ||
94 | #define EARLY_DEBUG_INIT() udbg_init_maple_realmode() | ||
95 | #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() | ||
96 | #define EARLY_DEBUG_INIT() \ | ||
97 | do { udbg_putc = call_rtas_display_status_delay; } while(0) | ||
98 | #endif | ||
99 | |||
100 | int have_of = 1; | 74 | int have_of = 1; |
101 | int boot_cpuid = 0; | 75 | int boot_cpuid = 0; |
102 | int boot_cpuid_phys = 0; | 76 | int boot_cpuid_phys = 0; |
@@ -237,11 +211,8 @@ void __init early_setup(unsigned long dt_ptr) | |||
237 | struct paca_struct *lpaca = get_paca(); | 211 | struct paca_struct *lpaca = get_paca(); |
238 | static struct machdep_calls **mach; | 212 | static struct machdep_calls **mach; |
239 | 213 | ||
240 | /* | 214 | /* Enable early debugging if any specified (see udbg.h) */ |
241 | * Enable early debugging if any specified (see top of | 215 | udbg_early_init(); |
242 | * this file) | ||
243 | */ | ||
244 | EARLY_DEBUG_INIT(); | ||
245 | 216 | ||
246 | DBG(" -> early_setup()\n"); | 217 | DBG(" -> early_setup()\n"); |
247 | 218 | ||
@@ -684,3 +655,28 @@ void cpu_die(void) | |||
684 | if (ppc_md.cpu_die) | 655 | if (ppc_md.cpu_die) |
685 | ppc_md.cpu_die(); | 656 | ppc_md.cpu_die(); |
686 | } | 657 | } |
658 | |||
659 | #ifdef CONFIG_SMP | ||
660 | void __init setup_per_cpu_areas(void) | ||
661 | { | ||
662 | int i; | ||
663 | unsigned long size; | ||
664 | char *ptr; | ||
665 | |||
666 | /* Copy section for each CPU (we discard the original) */ | ||
667 | size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); | ||
668 | #ifdef CONFIG_MODULES | ||
669 | if (size < PERCPU_ENOUGH_ROOM) | ||
670 | size = PERCPU_ENOUGH_ROOM; | ||
671 | #endif | ||
672 | |||
673 | for_each_cpu(i) { | ||
674 | ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size); | ||
675 | if (!ptr) | ||
676 | panic("Cannot allocate cpu data for CPU %d\n", i); | ||
677 | |||
678 | paca[i].data_offset = ptr - __per_cpu_start; | ||
679 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); | ||
680 | } | ||
681 | } | ||
682 | #endif | ||
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 558c1ceb2b93..3774e80094f5 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -15,11 +15,36 @@ | |||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/console.h> | 16 | #include <linux/console.h> |
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | #include <asm/udbg.h> | ||
18 | 19 | ||
19 | void (*udbg_putc)(char c); | 20 | void (*udbg_putc)(char c); |
20 | int (*udbg_getc)(void); | 21 | int (*udbg_getc)(void); |
21 | int (*udbg_getc_poll)(void); | 22 | int (*udbg_getc_poll)(void); |
22 | 23 | ||
24 | /* | ||
25 | * Early debugging facilities. You can enable _one_ of these via .config, | ||
26 | * if you do so your kernel _will not boot_ on anything else. Be careful. | ||
27 | */ | ||
28 | void __init udbg_early_init(void) | ||
29 | { | ||
30 | #if defined(CONFIG_PPC_EARLY_DEBUG_LPAR) | ||
31 | /* For LPAR machines that have an HVC console on vterm 0 */ | ||
32 | udbg_init_debug_lpar(); | ||
33 | #elif defined(CONFIG_PPC_EARLY_DEBUG_G5) | ||
34 | /* For use on Apple G5 machines */ | ||
35 | udbg_init_pmac_realmode(); | ||
36 | #elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS) | ||
37 | /* RTAS panel debug */ | ||
38 | udbg_init_rtas(); | ||
39 | #elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE) | ||
40 | /* Maple real mode debug */ | ||
41 | udbg_init_maple_realmode(); | ||
42 | #elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES) | ||
43 | /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ | ||
44 | udbg_init_iseries(); | ||
45 | #endif | ||
46 | } | ||
47 | |||
23 | /* udbg library, used by xmon et al */ | 48 | /* udbg library, used by xmon et al */ |
24 | void udbg_puts(const char *s) | 49 | void udbg_puts(const char *s) |
25 | { | 50 | { |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 7541bf44d2da..2da65a9c93f6 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -155,7 +155,7 @@ void udbg_maple_real_putc(unsigned char c) | |||
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | void udbg_init_maple_realmode(void) | 158 | void __init udbg_init_maple_realmode(void) |
159 | { | 159 | { |
160 | udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; | 160 | udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; |
161 | 161 | ||
diff --git a/arch/powerpc/kernel/vdso32/.gitignore b/arch/powerpc/kernel/vdso32/.gitignore new file mode 100644 index 000000000000..e45fba9d0ced --- /dev/null +++ b/arch/powerpc/kernel/vdso32/.gitignore | |||
@@ -0,0 +1 @@ | |||
vdso32.lds | |||
diff --git a/arch/powerpc/kernel/vdso64/.gitignore b/arch/powerpc/kernel/vdso64/.gitignore new file mode 100644 index 000000000000..3fd18cf9fec2 --- /dev/null +++ b/arch/powerpc/kernel/vdso64/.gitignore | |||
@@ -0,0 +1 @@ | |||
vdso64.lds | |||