diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-04 16:17:32 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-04 16:17:32 +1100 |
commit | 292a6c58e9133b57d004d92a846fff326dd31e92 (patch) | |
tree | a267d1881a9a0bcb69938becd0c182874cd6c19c /arch/powerpc/kernel | |
parent | 8ad200d7b7c8fac77cf705831e90e889360d7030 (diff) | |
parent | dc3a9efb5ee89493a42c3365d219e339e4720c2b (diff) |
Merge branch 'for-paulus' of git://kernel/home/michael/src/work/
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 18 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 22 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 23 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 7 |
5 files changed, 30 insertions, 42 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index ba30e3177b0..45d81976987 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -1914,24 +1914,6 @@ _GLOBAL(hmt_start_secondary) blr #endif -#if defined(CONFIG_KEXEC) || defined(CONFIG_SMP) -_GLOBAL(smp_release_cpus) - /* All secondary cpus are spinning on a common - * spinloop, release them all now so they can start - * to spin on their individual paca spinloops. - * For non SMP kernels, the secondary cpus never - * get out of the common spinloop. - * XXX This does nothing useful on iSeries, secondaries are - * already waiting on their paca. - */ - li r3,1 - LOADADDR(r5,__secondary_hold_spinloop) - std r3,0(r5) - sync - blr -#endif /* CONFIG_SMP */ - - /* * We put a few things here that have to be page-aligned. * This stuff goes at the beginning of the bss, which is page-aligned. diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8f85dabe4df..96843211cc5 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -48,8 +48,8 @@ #include <asm/prom.h> #ifdef CONFIG_PPC64 #include <asm/firmware.h> -#include <asm/plpar_wrappers.h> #include <asm/time.h> +#include <asm/machdep.h> #endif extern unsigned long _get_SP(void); @@ -201,27 +201,15 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) } #endif /* CONFIG_SPE */ -static void set_dabr_spr(unsigned long val) -{ - mtspr(SPRN_DABR, val); -} - int set_dabr(unsigned long dabr) { - int ret = 0; - #ifdef CONFIG_PPC64 - if (firmware_has_feature(FW_FEATURE_XDABR)) { - /* We want to catch accesses from kernel and userspace */ - unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER; - ret = plpar_set_xdabr(dabr, flags); - } else if (firmware_has_feature(FW_FEATURE_DABR)) { - ret = plpar_set_dabr(dabr); - } else + if (ppc_md.set_dabr) + return ppc_md.set_dabr(dabr); #endif - set_dabr_spr(dabr); - return ret; + mtspr(SPRN_DABR, dabr); + return 0; } #ifdef CONFIG_PPC64 diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 2eccd0e159e..eec2da69550 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -1285,7 +1285,7 @@ static int __init early_init_dt_scan_memory(unsigned long node, endp = reg + (l / sizeof(cell_t)); - DBG("memory scan node %s ..., reg size %ld, data: %x %x %x %x, ...\n", + DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", uname, l, reg[0], reg[1], reg[2], reg[3]); while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index d4a3c5dd1a2..275d86ddd61 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -103,8 +103,6 @@ extern void htab_initialize(void); extern void early_init_devtree(void *flat_dt); extern void unflatten_device_tree(void); -extern void smp_release_cpus(void); - int have_of = 1; int boot_cpuid = 0; int boot_cpuid_phys = 0; @@ -400,6 +398,27 @@ void __init early_setup(unsigned long dt_ptr) } +#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) +void smp_release_cpus(void) +{ + extern unsigned long __secondary_hold_spinloop; + + DBG(" -> smp_release_cpus()\n"); + + /* All secondary cpus are spinning on a common spinloop, release them + * all now so they can start to spin on their individual paca + * spinloops. For non SMP kernels, the secondary cpus never get out + * of the common spinloop. + * This is useless but harmless on iSeries, secondaries are already + * waiting on their paca spinloops. */ + + __secondary_hold_spinloop = 1; + mb(); + + DBG(" <- smp_release_cpus()\n"); +} +#endif /* CONFIG_SMP || CONFIG_KEXEC */ + /* * Initialize some remaining members of the ppc64_caches and systemcfg structures * (at least until we get rid of them completely). This is mostly some diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index d4dfcfbce27..9ceaa7a7bd0 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -1,11 +1,9 @@ #include <linux/config.h> -#ifdef CONFIG_PPC64 #include <asm/page.h> -#else -#define PAGE_SIZE 4096 -#endif #include <asm-generic/vmlinux.lds.h> +ENTRY(_stext) + #ifdef CONFIG_PPC64 OUTPUT_ARCH(powerpc:common64) jiffies = jiffies_64; @@ -21,6 +19,7 @@ SECTIONS *(.exit.data) } + . = KERNELBASE; /* Read-only sections, merged into text segment: */ #ifdef CONFIG_PPC32 |