From ad2b2426bb8dce97827182946e33e7f7ff0afbce Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 10 Jan 2006 21:57:40 +0100 Subject: [PATCH] enable the RTC driver in ppc64_defconfig Enable the RTC driver. Signed-off-by: Olaf Hering Signed-off-by: Paul Mackerras --- arch/powerpc/configs/ppc64_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 347f4391db8d..0b2b55a79c3c 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig @@ -878,7 +878,7 @@ CONFIG_HVCS=m # # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set +CONFIG_GEN_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set -- cgit v1.2.1 From af9deabeb0298559227fd9b481d33aefcb15ca54 Mon Sep 17 00:00:00 2001 From: linas Date: Tue, 10 Jan 2006 15:18:16 -0600 Subject: [PATCH] PCI Hotplug/powerpc: module build break The RPAPHP hoplug driver will not build as a module, because it calls on a pcibios routine which is not exported. This exports the symbol. Problem reported by Olaf Hering Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/pci_64.c | 3 +++ 1 file changed, 3 insertions(+) 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) list_for_each_entry(child_bus, &b->children, node) pcibios_claim_one_bus(child_bus); } +#ifdef CONFIG_HOTPLUG +EXPORT_SYMBOL_GPL(pcibios_claim_one_bus); +#endif #ifndef CONFIG_PPC_ISERIES static void __init pcibios_claim_of_setup(void) -- cgit v1.2.1 From f481f1edee77b3d623457685add1c6b507c25d6f Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 10 Jan 2006 22:31:53 +0100 Subject: [PATCH] powerpc: remove remaining crash_notes variable from machine_kexec.c remove remaining crash_notes definition to fix compile error /dev/shm/linux-2.6/arch/powerpc/kernel/machine_kexec.c:21: error: conflicting types for `crash_notes' /dev/shm/linux-2.6/include/linux/kexec.h:129: error: previous declaration of `crash_notes' Signed-off-by: Olaf Hering Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/machine_kexec.c | 6 ------ 1 file changed, 6 deletions(-) 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 @@ #include #include -/* - * Provide a dummy crash_notes definition until crash dump is implemented. - * This prevents breakage of crash_notes attribute in kernel/ksysfs.c. - */ -note_buf_t crash_notes[NR_CPUS]; - void machine_crash_shutdown(struct pt_regs *regs) { if (ppc_md.machine_crash_shutdown) -- cgit v1.2.1 From bf6a7112bda99aadd6675526423a96be6b356a3d Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 11 Jan 2006 11:54:08 +1100 Subject: [PATCH] powerpc: Early debugging support for iSeries Connect iSeries up to the standard early debugging infrastructure. To actually use this you need to enable the iSeries early debugging in setup_64.c. Then after the messages are logged hit Ctrl-x Ctrl-x on your console to dump the Hypervisor console buffer. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/setup_64.c | 14 +++++++++----- arch/powerpc/platforms/iseries/setup.c | 18 +++++++++++++++--- drivers/char/viocons.c | 4 ++-- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index c4b76961d6de..177d8249078d 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -75,22 +75,26 @@ * but your kernel will not boot on anything else if you do so */ -/* This one is for use on LPAR machines that support an HVC console - * on vterm 0 - */ +/* For use on LPAR machines that support an HVC console on vterm 0 */ extern void udbg_init_debug_lpar(void); -/* This one is for use on Apple G5 machines - */ + +/* This one is for use on Apple G5 machines */ extern void udbg_init_pmac_realmode(void); + /* That's RTAS panel debug */ extern void call_rtas_display_status_delay(unsigned char c); + /* Here's maple real mode debug */ extern void udbg_init_maple_realmode(void); +/* For iSeries - hit Ctrl-x Ctrl-x to see the output */ +extern void udbg_init_iseries(void); + #define EARLY_DEBUG_INIT() do {} while(0) #if 0 #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() +#define EARLY_DEBUG_INIT() udbg_init_iseries() #define EARLY_DEBUG_INIT() udbg_init_maple_realmode() #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() #define EARLY_DEBUG_INIT() \ diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index ad5ef80500ce..25cdebdf6f2e 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c @@ -52,6 +52,7 @@ #include #include #include +#include #include "naca.h" #include "setup.h" @@ -62,10 +63,8 @@ #include "call_sm.h" #include "call_hpt.h" -extern void hvlog(char *fmt, ...); - #ifdef DEBUG -#define DBG(fmt...) hvlog(fmt) +#define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif @@ -984,3 +983,16 @@ static int __init early_parsemem(char *p) return 0; } early_param("mem", early_parsemem); + +static void hvputc(char c) +{ + if (c == '\n') + hvputc('\r'); + + HvCall_writeLogBuffer(&c, 1); +} + +void __init udbg_init_iseries(void) +{ + udbg_putc = hvputc; +} diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index cb82ebf4cb07..bead38a4a68a 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c @@ -131,7 +131,7 @@ static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp); static struct tty_driver *viotty_driver; -void hvlog(char *fmt, ...) +static void hvlog(char *fmt, ...) { int i; unsigned long flags; @@ -147,7 +147,7 @@ void hvlog(char *fmt, ...) spin_unlock_irqrestore(&consoleloglock, flags); } -void hvlogOutput(const char *buf, int count) +static void hvlogOutput(const char *buf, int count) { unsigned long flags; int begin; -- cgit v1.2.1 From 296167ae1799815b9ed2d135a847436502f2ee91 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 11 Jan 2006 11:54:09 +1100 Subject: [PATCH] powerpc: Make early debugging configurable via Kconfig This patch adds Kconfig entries to control the early debugging options, currently in setup_64.c. Doing this via Kconfig rather than #defines means you can have one source tree, which is buildable for multiple platforms - and you can enable the correct early debug option for each platform via .config. I made udbg_early_init() a static inline because otherwise GCC is to daft to optimise it away when debugging is off. Now that we have udbg_init_rtas() we can make call_rtas_display_status* static. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/Kconfig.debug | 42 ++++++++++++++++++++++++++++++ arch/powerpc/kernel/rtas.c | 12 ++++++--- arch/powerpc/kernel/setup_64.c | 38 ++------------------------- arch/powerpc/kernel/udbg.c | 25 ++++++++++++++++++ arch/powerpc/kernel/udbg_16550.c | 2 +- arch/powerpc/platforms/powermac/udbg_scc.c | 2 +- include/asm-powerpc/rtas.h | 1 - include/asm-powerpc/udbg.h | 9 ++++++- 8 files changed, 88 insertions(+), 43 deletions(-) diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 30a30bf559ea..9254806f7032 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -115,4 +115,46 @@ config PPC_OCP depends on IBM_OCP || XILINX_OCP default y +choice + prompt "Early debugging (dangerous)" + bool + optional + help + Enable early debugging. Careful, if you enable debugging for the + wrong type of machine your kernel _will not boot_. + +config PPC_EARLY_DEBUG_LPAR + bool "LPAR HV Console" + depends on PPC_PSERIES + help + Select this to enable early debugging for a machine with a HVC + console on vterm 0. + +config PPC_EARLY_DEBUG_G5 + bool "Apple G5" + depends on PPC_PMAC64 + help + Select this to enable early debugging for Apple G5 machines. + +config PPC_EARLY_DEBUG_RTAS + bool "RTAS Panel" + depends on PPC_RTAS + help + Select this to enable early debugging via the RTAS panel. + +config PPC_EARLY_DEBUG_MAPLE + bool "Maple real mode" + depends on PPC_MAPLE + help + Select this to enable early debugging for Maple. + +config PPC_EARLY_DEBUG_ISERIES + bool "iSeries HV Console" + depends on PPC_ISERIES + help + Select this to enable early debugging for legacy iSeries. You need + to hit "Ctrl-x Ctrl-x" to see the messages on the console. + +endchoice + endmenu 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 @@ #include #include #include +#include struct rtas_t rtas = { .lock = SPIN_LOCK_UNLOCKED @@ -52,7 +53,7 @@ EXPORT_SYMBOL(rtas_flash_term_hook); * are designed only for very early low-level debugging, which * is why the token is hard-coded to 10. */ -void call_rtas_display_status(unsigned char c) +static void call_rtas_display_status(char c) { struct rtas_args *args = &rtas.args; unsigned long s; @@ -65,14 +66,14 @@ void call_rtas_display_status(unsigned char c) args->nargs = 1; args->nret = 1; args->rets = (rtas_arg_t *)&(args->args[1]); - args->args[0] = (int)c; + args->args[0] = (unsigned char)c; enter_rtas(__pa(args)); spin_unlock_irqrestore(&rtas.lock, s); } -void call_rtas_display_status_delay(unsigned char c) +static void call_rtas_display_status_delay(char c) { static int pending_newline = 0; /* did last write end with unprinted newline? */ static int width = 16; @@ -96,6 +97,11 @@ void call_rtas_display_status_delay(unsigned char c) } } +void __init udbg_init_rtas(void) +{ + udbg_putc = call_rtas_display_status_delay; +} + void rtas_progress(char *s, unsigned short hex) { struct device_node *root; diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 177d8249078d..0420418f317a 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -70,37 +70,6 @@ #define DBG(fmt...) #endif -/* - * Here are some early debugging facilities. You can enable one - * but your kernel will not boot on anything else if you do so - */ - -/* For use on LPAR machines that support an HVC console on vterm 0 */ -extern void udbg_init_debug_lpar(void); - -/* This one is for use on Apple G5 machines */ -extern void udbg_init_pmac_realmode(void); - -/* That's RTAS panel debug */ -extern void call_rtas_display_status_delay(unsigned char c); - -/* Here's maple real mode debug */ -extern void udbg_init_maple_realmode(void); - -/* For iSeries - hit Ctrl-x Ctrl-x to see the output */ -extern void udbg_init_iseries(void); - -#define EARLY_DEBUG_INIT() do {} while(0) - -#if 0 -#define EARLY_DEBUG_INIT() udbg_init_debug_lpar() -#define EARLY_DEBUG_INIT() udbg_init_iseries() -#define EARLY_DEBUG_INIT() udbg_init_maple_realmode() -#define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() -#define EARLY_DEBUG_INIT() \ - do { udbg_putc = call_rtas_display_status_delay; } while(0) -#endif - int have_of = 1; int boot_cpuid = 0; int boot_cpuid_phys = 0; @@ -241,11 +210,8 @@ void __init early_setup(unsigned long dt_ptr) struct paca_struct *lpaca = get_paca(); static struct machdep_calls **mach; - /* - * Enable early debugging if any specified (see top of - * this file) - */ - EARLY_DEBUG_INIT(); + /* Enable early debugging if any specified (see udbg.h) */ + udbg_early_init(); DBG(" -> early_setup()\n"); 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 @@ #include #include #include +#include void (*udbg_putc)(char c); int (*udbg_getc)(void); int (*udbg_getc_poll)(void); +/* + * Early debugging facilities. You can enable _one_ of these via .config, + * if you do so your kernel _will not boot_ on anything else. Be careful. + */ +void __init udbg_early_init(void) +{ +#if defined(CONFIG_PPC_EARLY_DEBUG_LPAR) + /* For LPAR machines that have an HVC console on vterm 0 */ + udbg_init_debug_lpar(); +#elif defined(CONFIG_PPC_EARLY_DEBUG_G5) + /* For use on Apple G5 machines */ + udbg_init_pmac_realmode(); +#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS) + /* RTAS panel debug */ + udbg_init_rtas(); +#elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE) + /* Maple real mode debug */ + udbg_init_maple_realmode(); +#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES) + /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ + udbg_init_iseries(); +#endif +} + /* udbg library, used by xmon et al */ void udbg_puts(const char *s) { 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) } } -void udbg_init_maple_realmode(void) +void __init udbg_init_maple_realmode(void) { udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c index e87d53acfb61..c4352a8db644 100644 --- a/arch/powerpc/platforms/powermac/udbg_scc.c +++ b/arch/powerpc/platforms/powermac/udbg_scc.c @@ -153,7 +153,7 @@ static void udbg_real_scc_putc(char c) udbg_real_scc_putc('\r'); } -void udbg_init_pmac_realmode(void) +void __init udbg_init_pmac_realmode(void) { sccc = (volatile u8 __iomem *)0x80013020ul; sccd = (volatile u8 __iomem *)0x80013030ul; diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 3428889e27b7..f43c6835e62a 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h @@ -161,7 +161,6 @@ extern struct rtas_t rtas; extern void enter_rtas(unsigned long); extern int rtas_token(const char *service); extern int rtas_call(int token, int, int, int *, ...); -extern void call_rtas_display_status(unsigned char); extern void rtas_restart(char *cmd); extern void rtas_power_off(void); extern void rtas_halt(void); diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 479f2d8ff74a..5c4236c342bb 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h @@ -1,5 +1,5 @@ /* - * c 2001 PPC 64 Team, IBM Corp + * (c) 2001, 2006 IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -36,5 +36,12 @@ extern void udbg_scc_init(int force_scc); extern int udbg_adb_init(int force_btext); extern void udbg_adb_init_early(void); +extern void __init udbg_early_init(void); +extern void __init udbg_init_debug_lpar(void); +extern void __init udbg_init_pmac_realmode(void); +extern void __init udbg_init_maple_realmode(void); +extern void __init udbg_init_iseries(void); +extern void __init udbg_init_rtas(void); + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_UDBG_H */ -- cgit v1.2.1 From 193cac99f6d8604aca71e5a966a8cd1dfb84819d Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Wed, 11 Jan 2006 12:08:56 +1100 Subject: [PATCH] powerpc: parallel port init fix This stops parport from accessing nonexistent parallel ports. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras --- include/asm-powerpc/parport.h | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/include/asm-powerpc/parport.h b/include/asm-powerpc/parport.h index 897e49a88a6b..3fca21ddf546 100644 --- a/include/asm-powerpc/parport.h +++ b/include/asm-powerpc/parport.h @@ -10,10 +10,34 @@ #define _ASM_POWERPC_PARPORT_H #ifdef __KERNEL__ -static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); +#include + +extern struct parport *parport_pc_probe_port (unsigned long int base, + unsigned long int base_hi, + int irq, int dma, + struct pci_dev *dev); + static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) { - return parport_pc_find_isa_ports (autoirq, autodma); + struct device_node *np; + u32 *prop; + u32 io1, io2; + int propsize; + int count = 0; + for (np = NULL; (np = of_find_compatible_node(np, + "parallel", + "pnpPNP,400")) != NULL;) { + prop = (u32 *)get_property(np, "reg", &propsize); + if (!prop || propsize > 6*sizeof(u32)) + continue; + io1 = prop[1]; io2 = prop[2]; + prop = (u32 *)get_property(np, "interrupts", NULL); + if (!prop) + continue; + if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL) + count++; + } + return count; } #endif /* __KERNEL__ */ -- cgit v1.2.1 From 7a0268fa1a3613f2c526a9b3058701b277f6abe1 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 11 Jan 2006 13:16:44 +1100 Subject: [PATCH] powerpc/64: per cpu data optimisations The current ppc64 per cpu data implementation is quite slow. eg: lhz 11,18(13) /* smp_processor_id() */ ld 9,.LC63-.LCTOC1(30) /* per_cpu__variable_name */ ld 8,.LC61-.LCTOC1(30) /* __per_cpu_offset */ sldi 11,11,3 /* form index into __per_cpu_offset */ mr 10,9 ldx 9,11,8 /* __per_cpu_offset[smp_processor_id()] */ ldx 0,10,9 /* load per cpu data */ 5 loads for something that is supposed to be fast, pretty awful. One reason for the large number of loads is that we have to synthesize 2 64bit constants (per_cpu__variable_name and __per_cpu_offset). By putting __per_cpu_offset into the paca we can avoid the 2 loads associated with it: ld 11,56(13) /* paca->data_offset */ ld 9,.LC59-.LCTOC1(30) /* per_cpu__variable_name */ ldx 0,9,11 /* load per cpu data Longer term we can should be able to do even better than 3 loads. If per_cpu__variable_name wasnt a 64bit constant and paca->data_offset was in a register we could cut it down to one load. A suggestion from Rusty is to use gcc's __thread extension here. In order to do this we would need to free up r13 (the __thread register and where the paca currently is). So far Ive had a few unsuccessful attempts at doing that :) The patch also allocates per cpu memory node local on NUMA machines. This patch from Rusty has been sitting in my queue _forever_ but stalled when I hit the compiler bug. Sorry about that. Finally I also only allocate per cpu data for possible cpus, which comes straight out of the x86-64 port. On a pseries kernel (with NR_CPUS == 128) and 4 possible cpus we see some nice gains: total used free shared buffers cached Mem: 4012228 212860 3799368 0 0 162424 total used free shared buffers cached Mem: 4016200 212984 3803216 0 0 162424 A saving of 3.75MB. Quite nice for smaller machines. Note: we now have to be careful of per cpu users that touch data for !possible cpus. At this stage it might be worth making the NUMA and possible cpu optimisations generic, but per cpu init is done so early we have to be careful that all architectures have their possible map setup correctly. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/setup_64.c | 26 ++++++++++++++++++++ include/asm-powerpc/paca.h | 1 + include/asm-powerpc/percpu.h | 56 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 0420418f317a..e29b275e09e0 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -654,3 +655,28 @@ void cpu_die(void) if (ppc_md.cpu_die) ppc_md.cpu_die(); } + +#ifdef CONFIG_SMP +void __init setup_per_cpu_areas(void) +{ + int i; + unsigned long size; + char *ptr; + + /* Copy section for each CPU (we discard the original) */ + size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); +#ifdef CONFIG_MODULES + if (size < PERCPU_ENOUGH_ROOM) + size = PERCPU_ENOUGH_ROOM; +#endif + + for_each_cpu(i) { + ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size); + if (!ptr) + panic("Cannot allocate cpu data for CPU %d\n", i); + + paca[i].data_offset = ptr - __per_cpu_start; + memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); + } +} +#endif diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 3ae52d9dc9ff..a64b4d425dab 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h @@ -65,6 +65,7 @@ struct paca_struct { u64 stab_real; /* Absolute address of segment table */ u64 stab_addr; /* Virtual address of segment table */ void *emergency_sp; /* pointer to emergency stack */ + u64 data_offset; /* per cpu data offset */ s16 hw_cpu_id; /* Physical processor number */ u8 cpu_start; /* At startup, processor spins until */ /* this becomes non-zero. */ diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index 06a959d67234..e31922c50e53 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h @@ -1 +1,57 @@ +#ifndef _ASM_POWERPC_PERCPU_H_ +#define _ASM_POWERPC_PERCPU_H_ +#ifdef __powerpc64__ +#include + +/* + * Same as asm-generic/percpu.h, except that we store the per cpu offset + * in the paca. Based on the x86-64 implementation. + */ + +#ifdef CONFIG_SMP + +#include + +#define __per_cpu_offset(cpu) (paca[cpu].data_offset) +#define __my_cpu_offset() get_paca()->data_offset + +/* Separate out the type, so (int[3], foo) works. */ +#define DEFINE_PER_CPU(type, name) \ + __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name + +/* var is in discarded region: offset to particular copy we want */ +#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) +#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) + +/* A macro to avoid #include hell... */ +#define percpu_modcopy(pcpudst, src, size) \ +do { \ + unsigned int __i; \ + for (__i = 0; __i < NR_CPUS; __i++) \ + if (cpu_possible(__i)) \ + memcpy((pcpudst)+__per_cpu_offset(__i), \ + (src), (size)); \ +} while (0) + +extern void setup_per_cpu_areas(void); + +#else /* ! SMP */ + +#define DEFINE_PER_CPU(type, name) \ + __typeof__(type) per_cpu__##name + +#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) +#define __get_cpu_var(var) per_cpu__##var + +#endif /* SMP */ + +#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name + +#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) +#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) + +#else #include +#endif + +#endif /* _ASM_POWERPC_PERCPU_H_ */ -- cgit v1.2.1 From 415c2e083a85f0daf6cbb4988691ac3ea9279509 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 11 Jan 2006 13:51:22 +1100 Subject: [PATCH] powerpc: fix up iSeries console after TTY layer buffering revamp Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- drivers/char/viocons.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index bead38a4a68a..faee5e7acaf7 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c @@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event) struct viocharlpevent *cevent = (struct viocharlpevent *)event; struct port_info *pi; int index; + int num_pushed; u8 port = cevent->virtual_device; if (port >= VTTY_PORTS) { @@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event) * functionality will only work if built into the kernel and * then only if sysrq is enabled through the proc filesystem. */ + num_pushed = 0; for (index = 0; index < cevent->len; index++) { #ifdef CONFIG_MAGIC_SYSRQ if (sysrq_enabled) { @@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event) printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); break; } + num_pushed++; } - /* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */ - if (tty->flip.count) - /* The next call resets flip.count when the data is flushed. */ + if (num_pushed) tty_flip_buffer_push(tty); } -- cgit v1.2.1 From 6bac953fa424519f784ba2589fefd8f040ce54f0 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 11 Jan 2006 15:30:07 +1100 Subject: powerpc: Fix compile error when CONFIG_PROC_VMCORE is not defined We were getting elfcorehdr_addr undefined in this case. Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/crash_dump.c | 2 ++ 1 file changed, 2 insertions(+) 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) DBG(" <- kdump_setup()\n"); } +#ifdef CONFIG_PROC_VMCORE static int __init parse_elfcorehdr(char *p) { if (p) @@ -63,6 +64,7 @@ static int __init parse_elfcorehdr(char *p) return 0; } __setup("elfcorehdr=", parse_elfcorehdr); +#endif static int __init parse_savemaxmem(char *p) { -- cgit v1.2.1 From f6cc82fc0b2b6be9ab25f0bfc285e6358db3597a Mon Sep 17 00:00:00 2001 From: Haren Myneni Date: Tue, 10 Jan 2006 19:25:25 -0800 Subject: [PATCH] powerpc: fix for compile problem in kdump code when SMP disabled This patch fixes the compilation error (shown below) when CONFIG_SMP=n. arch/powerpc/kernel/crash.c: In function `crash_kexec_prepare_cpus': arch/powerpc/kernel/crash.c:236: error: implicit declaration of function `smp_release_cpus' Signed-off-by: Haren Myneni Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/crash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #ifdef DEBUG #include -- cgit v1.2.1 From 7f52eb009306b8047031eaf64169a7ce437a26e7 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Tue, 10 Jan 2006 19:47:37 -0800 Subject: [PATCH] spufs: Suspend/restore MFC DMA operations at SPU context switch. The SPE Book IV indicates that MFC DMA operations must be suspended and restored on SPU context switch (in Step 8). This patch adds that operation, which is missing from the current spufs implementation. Signed-off-by: Masato Noguchi Signed-off-by: Geoff Levand Acked-by: Arnd Bergmann Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/cell/spufs/switch.c | 34 +++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 1061c12b2edb..212db28531fa 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c @@ -169,11 +169,33 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu) struct spu_priv2 __iomem *priv2 = spu->priv2; /* Save, Step 8: - * Read and save MFC_CNTL[Ss]. - */ - if (csa) { - csa->priv2.mfc_control_RW = in_be64(&priv2->mfc_control_RW) & - MFC_CNTL_SUSPEND_DMA_STATUS_MASK; + * Suspend DMA and save MFC_CNTL. + */ + switch (in_be64(&priv2->mfc_control_RW) & + MFC_CNTL_SUSPEND_DMA_STATUS_MASK) { + case MFC_CNTL_SUSPEND_IN_PROGRESS: + POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) & + MFC_CNTL_SUSPEND_DMA_STATUS_MASK) == + MFC_CNTL_SUSPEND_COMPLETE); + /* fall through */ + case MFC_CNTL_SUSPEND_COMPLETE: + if (csa) { + csa->priv2.mfc_control_RW = + in_be64(&priv2->mfc_control_RW) | + MFC_CNTL_SUSPEND_DMA_QUEUE; + } + break; + case MFC_CNTL_NORMAL_DMA_QUEUE_OPERATION: + out_be64(&priv2->mfc_control_RW, MFC_CNTL_SUSPEND_DMA_QUEUE); + POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) & + MFC_CNTL_SUSPEND_DMA_STATUS_MASK) == + MFC_CNTL_SUSPEND_COMPLETE); + if (csa) { + csa->priv2.mfc_control_RW = + in_be64(&priv2->mfc_control_RW) & + ~MFC_CNTL_SUSPEND_DMA_QUEUE; + } + break; } } @@ -237,6 +259,8 @@ static inline void save_mfc_decr(struct spu_state *csa, struct spu *spu) eieio(); csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW); eieio(); + } else { + csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING; } } -- cgit v1.2.1 From 08264cbc9f4ded253e063ed4a804226b195e067c Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 10 Jan 2006 21:43:56 -0600 Subject: [PATCH] powerpc: Updated Kconfig and Makefiles for 83xx support Updated Kconfig & Makefiles in prep for adding support for the Freescale MPC83xx family of processors to arch/powerpc. Moved around some config options that are more globally applicable to other PowerPC processors. Added a temporary config option (83xx) to match existing arch/ppc support for the MPC83xx line. Signed-off-by: Kumar Gala Signed-off-by: Paul Mackerras --- arch/powerpc/Kconfig | 83 ++++++++++++++++++------------ arch/powerpc/platforms/83xx/Kconfig | 26 ++++++++++ arch/powerpc/platforms/83xx/Makefile | 4 ++ arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/embedded6xx/Kconfig | 18 ------- arch/powerpc/sysdev/Makefile | 2 +- arch/ppc/Kconfig | 4 ++ 7 files changed, 85 insertions(+), 53 deletions(-) create mode 100644 arch/powerpc/platforms/83xx/Kconfig create mode 100644 arch/powerpc/platforms/83xx/Makefile diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 935d96571515..01feed0e2a15 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -71,15 +71,39 @@ config ARCH_MAY_HAVE_PC_FDC bool default y +config PPC_OF + def_bool y + +config PPC_UDBG_16550 + bool + default n + +config CRASH_DUMP + bool "kernel crash dumps (EXPERIMENTAL)" + depends on PPC_MULTIPLATFORM + depends on EXPERIMENTAL + help + Build a kernel suitable for use as a kdump capture kernel. + The kernel will be linked at a different address than normal, and + so can only be used for Kdump. + + Don't change this unless you know what you are doing. + +config GENERIC_TBSYNC + bool + default y if PPC32 && SMP + default n + menu "Processor support" choice prompt "Processor Type" depends on PPC32 default 6xx -config 6xx +config CLASSIC32 bool "6xx/7xx/74xx" select PPC_FPU + select 6xx help There are four families of PowerPC chips supported. The more common types (601, 603, 604, 740, 750, 7400), the Motorola embedded @@ -93,12 +117,20 @@ config 6xx config PPC_52xx bool "Freescale 52xx" + select 6xx + select PPC_FPU config PPC_82xx bool "Freescale 82xx" + select 6xx + select PPC_FPU config PPC_83xx bool "Freescale 83xx" + select 6xx + select FSL_SOC + select 83xx + select PPC_FPU config 40x bool "AMCC 40x" @@ -134,6 +166,13 @@ config POWER4 depends on PPC64 def_bool y +config 6xx + bool + +# this is temp to handle compat with arch=ppc +config 83xx + bool + config PPC_FPU bool default y if PPC64 @@ -166,7 +205,7 @@ config PHYS_64BIT config ALTIVEC bool "AltiVec Support" - depends on 6xx || POWER4 + depends on CLASSIC32 || POWER4 ---help--- This option enables kernel support for the Altivec extensions to the PowerPC processor. The kernel currently supports saving and restoring @@ -239,7 +278,7 @@ endmenu source "init/Kconfig" menu "Platform support" - depends on PPC64 || 6xx + depends on PPC64 || CLASSIC32 choice prompt "Machine type" @@ -330,9 +369,6 @@ config PPC_CELL select MMIO_NVRAM select PPC_UDBG_16550 -config PPC_OF - def_bool y - config XICS depends on PPC_PSERIES bool @@ -375,26 +411,11 @@ config MPIC_BROKEN_U3 depends on PPC_MAPLE default y -config PPC_UDBG_16550 - bool - default n - config CELL_IIC depends on PPC_CELL bool default y -config CRASH_DUMP - bool "kernel crash dumps (EXPERIMENTAL)" - depends on PPC_MULTIPLATFORM - depends on EXPERIMENTAL - help - Build a kernel suitable for use as a kdump capture kernel. - The kernel will be linked at a different address than normal, and - so can only be used for Kdump. - - Don't change this unless you know what you are doing. - config IBMVIO depends on PPC_PSERIES || PPC_ISERIES bool @@ -410,11 +431,6 @@ config PPC_MPC106 bool default n -config GENERIC_TBSYNC - bool - default y if PPC32 && SMP - default n - source "drivers/cpufreq/Kconfig" config CPU_FREQ_PMAC @@ -495,6 +511,7 @@ endmenu source arch/powerpc/platforms/embedded6xx/Kconfig source arch/powerpc/platforms/4xx/Kconfig +source arch/powerpc/platforms/83xx/Kconfig source arch/powerpc/platforms/85xx/Kconfig source arch/powerpc/platforms/8xx/Kconfig source arch/powerpc/platforms/cell/Kconfig @@ -718,7 +735,7 @@ config PPC_I8259 config PPC_INDIRECT_PCI bool depends on PCI - default y if 40x || 44x || 85xx || 83xx + default y if 40x || 44x || 85xx default n config EISA @@ -727,13 +744,16 @@ config EISA config SBUS bool +config FSL_SOC + bool + # Yes MCA RS/6000s exist but Linux-PPC does not currently support any config MCA bool config PCI - bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) - default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx + bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) + default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS default PCI_QSPAN if !4xx && !CPM2 && 8xx help @@ -746,11 +766,6 @@ config PCI_DOMAINS bool default PCI -config MPC83xx_PCI2 - bool " Supprt for 2nd PCI host controller" - depends on PCI && MPC834x - default y if MPC834x_SYS - config PCI_QSPAN bool "QSpan PCI" depends on !4xx && !CPM2 && 8xx diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig new file mode 100644 index 000000000000..b20812d460e6 --- /dev/null +++ b/arch/powerpc/platforms/83xx/Kconfig @@ -0,0 +1,26 @@ +menu "Platform support" + depends on PPC_83xx + +choice + prompt "Machine Type" + default MPC834x_SYS + +config MPC834x_SYS + bool "Freescale MPC834x SYS" + help + This option enables support for the MPC 834x SYS evaluation board. + + Be aware that PCI buses can only function when SYS board is plugged + into the PIB (Platform IO Board) board from Freescale which provide + 3 PCI slots. The PIBs PCI initialization is the bootloader's + responsiblilty. + +endchoice + +config MPC834x + bool + select PPC_UDBG_16550 + select PPC_INDIRECT_PCI + default y if MPC834x_SYS + +endmenu diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile new file mode 100644 index 000000000000..9d8b28ef3343 --- /dev/null +++ b/arch/powerpc/platforms/83xx/Makefile @@ -0,0 +1,4 @@ +# +# Makefile for the PowerPC 83xx linux kernel. +# +obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 8836b3a00668..04073fd987ec 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile @@ -7,6 +7,7 @@ endif endif obj-$(CONFIG_PPC_CHRP) += chrp/ obj-$(CONFIG_4xx) += 4xx/ +obj-$(CONFIG_PPC_83xx) += 83xx/ obj-$(CONFIG_85xx) += 85xx/ obj-$(CONFIG_PPC_PSERIES) += pseries/ obj-$(CONFIG_PPC_ISERIES) += iseries/ diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig index 81250090f98d..4fdbc9ae876b 100644 --- a/arch/powerpc/platforms/embedded6xx/Kconfig +++ b/arch/powerpc/platforms/embedded6xx/Kconfig @@ -144,16 +144,6 @@ config LITE5200 much but it's only been tested on this board version. I think this board is also known as IceCube. -config MPC834x_SYS - bool "Freescale MPC834x SYS" - help - This option enables support for the MPC 834x SYS evaluation board. - - Be aware that PCI buses can only function when SYS board is plugged - into the PIB (Platform IO Board) board from Freescale which provide - 3 PCI slots. The PIBs PCI initialization is the bootloader's - responsiblilty. - config EV64360 bool "Marvell-EV64360BP" help @@ -192,14 +182,6 @@ config 8272 The MPC8272 CPM has a different internal dpram setup than other CPM2 devices -config 83xx - bool - default y if MPC834x_SYS - -config MPC834x - bool - default y if MPC834x_SYS - config CPM2 bool depends on 8260 || MPC8560 || MPC8555 diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 14b9abde2d27..0ae841347a09 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -6,4 +6,4 @@ obj-$(CONFIG_BOOKE) += dcr.o obj-$(CONFIG_40x) += dcr.o obj-$(CONFIG_U3_DART) += dart_iommu.o obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o -obj-$(CONFIG_83xx) += ipic.o +obj-$(CONFIG_PPC_83xx) += ipic.o diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index e396f4591d59..d65810108bc3 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -743,6 +743,10 @@ config MPC834x bool default y if MPC834x_SYS +config PPC_83xx + bool + default y if 83xx + config CPM1 bool depends on 8xx -- cgit v1.2.1 From 0e5e39bfd811be4612a23242353b426ac6438e03 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 10 Jan 2006 22:12:23 -0600 Subject: [PATCH] powerpc: Add some missing .gitignore's ignore generated files under arch/powerpc Signed-off-by: Kumar Gala Signed-off-by: Paul Mackerras --- arch/powerpc/boot/.gitignore | 20 ++++++++++++++++++++ arch/powerpc/kernel/vdso32/.gitignore | 1 + arch/powerpc/kernel/vdso64/.gitignore | 1 + 3 files changed, 22 insertions(+) create mode 100644 arch/powerpc/boot/.gitignore create mode 100644 arch/powerpc/kernel/vdso32/.gitignore create mode 100644 arch/powerpc/kernel/vdso64/.gitignore diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore new file mode 100644 index 000000000000..45c9ad23526e --- /dev/null +++ b/arch/powerpc/boot/.gitignore @@ -0,0 +1,20 @@ +addnote +infblock.c +infblock.h +infcodes.c +infcodes.h +inffast.c +inffast.h +inflate.c +inftrees.c +inftrees.h +infutil.c +infutil.h +kernel-vmlinux.strip.c +kernel-vmlinux.strip.gz +uImage +zImage +zImage.vmode +zconf.h +zlib.h +zutil.h 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 -- cgit v1.2.1 From 7eb5476f68cd6c6e7a065083e1741a72a666ac6d Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 11 Jan 2006 15:27:24 +1100 Subject: [PATCH] powerpc: Add ibm,pft-size to iSeries device tree To make iSeries just a teensy bit less special, create ibm,pft-size properties in the iSeries device tree. We can then rely on htab_dt_scan_pftsize() to set ppc64_pft_size for us. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/iseries/setup.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 25cdebdf6f2e..9dea9f5f9301 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c @@ -473,8 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void) printk("HPT absolute addr = %016lx, size = %dK\n", chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); - ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE); - /* * The actual hashed page table is in the hypervisor, * we have no direct access @@ -860,6 +858,11 @@ void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n) dt_prop(dt, name, (char *)data, sizeof(u64) * n); } +void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n) +{ + dt_prop(dt, name, (char *)data, sizeof(u32) * n); +} + void dt_prop_empty(struct iseries_flat_dt *dt, char *name) { dt_prop(dt, name, NULL, 0); @@ -871,6 +874,7 @@ void dt_cpus(struct iseries_flat_dt *dt) unsigned char *p; unsigned int i, index; struct IoHriProcessorVpd *d; + u32 pft_size[2]; /* yuck */ snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); @@ -881,6 +885,9 @@ void dt_cpus(struct iseries_flat_dt *dt) dt_prop_u32(dt, "#address-cells", 1); dt_prop_u32(dt, "#size-cells", 0); + pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */ + pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE); + for (i = 0; i < NR_CPUS; i++) { if (paca[i].lppaca.dyn_proc_status >= 2) continue; @@ -907,6 +914,8 @@ void dt_cpus(struct iseries_flat_dt *dt) dt_prop_u32(dt, "reg", i); + dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2); + dt_end_node(dt); } -- cgit v1.2.1 From c9c47b6e27ca49fb0eea6b021b4919cb2467c8e1 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 11 Jan 2006 15:27:25 +1100 Subject: [PATCH] powerpc: Remove redundant setting of htab_address iSeries doesn't need to set the htab_address explicitly, htab_initialize() will do it for us later. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/iseries/setup.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 9dea9f5f9301..c6bbe5c25107 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c @@ -473,12 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void) printk("HPT absolute addr = %016lx, size = %dK\n", chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); - /* - * The actual hashed page table is in the hypervisor, - * we have no direct access - */ - htab_address = NULL; - /* * Determine if absolute memory has any * holes so that we can interpret the -- cgit v1.2.1 From c38a04b1ba67e488d94ec680a7dddd4e32d6ddfb Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 11 Jan 2006 16:27:21 +1100 Subject: powerpc/32: Fix compile error caused by pud_t/pgt_t confusion PPC32 is still using asm-generic/4level-fixup.h, but asm-powerpc/page.h was defining pud_t and pgd_t. Depending on the order in which files got included, this could result in a compilation error. Tweak the ifdef so that page.h doesn't try to define pud_t on ppc32 (which uses 2-level page tables). Signed-off-by: Paul Mackerras --- include/asm-powerpc/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index 76d7cb4b4ffc..0b82df483f7f 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h @@ -178,7 +178,7 @@ typedef unsigned long pmd_t; #define pmd_val(x) (x) #define __pmd(x) (x) -#ifndef CONFIG_PPC_64K_PAGES +#if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES) typedef unsigned long pud_t; #define pud_val(x) (x) #define __pud(x) (x) -- cgit v1.2.1 From 886c98d78652f78a64cb21516d3b25ffd5c05e94 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 10 Jan 2006 22:36:37 -0600 Subject: [PATCH] powerpc: Fix clean_files in arch/powerpc/boot Makefile clean-files was being set twice rather than being appended to. Signed-off-by: Kumar Gala Signed-off-by: Paul Mackerras --- arch/powerpc/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 22726aefc8ea..b53d677f6742 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -176,4 +176,4 @@ $(obj)/uImage: $(obj)/vmlinux.gz install: $(CONFIGURE) $(BOOTIMAGE) sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" -clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) +clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) -- cgit v1.2.1 From 97b1b999748d3cde6a3f381e0839e0f1082323e6 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 11 Jan 2006 16:41:29 +1100 Subject: [PATCH] powerpc: Don't build crash.c for PPC32 arch/powerpc/kernel/crash.c isn't safe for PPC32 (yet?), so don't build it. Built with CONFIG_KEXEC=y for pmac32_defconfig, pseries_defconfig, and g5_defconfig. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 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) pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ pci_direct_iommu.o iomap.o obj-$(CONFIG_PCI) += $(pci64-y) -kexec-$(CONFIG_PPC64) := machine_kexec_64.o +kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o kexec-$(CONFIG_PPC32) := machine_kexec_32.o -obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) +obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y) ifeq ($(CONFIG_PPC_ISERIES),y) $(obj)/head_64.o: $(obj)/lparmap.s -- cgit v1.2.1