aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-04 00:17:32 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-04 00:17:32 -0500
commit292a6c58e9133b57d004d92a846fff326dd31e92 (patch)
treea267d1881a9a0bcb69938becd0c182874cd6c19c /arch/powerpc/kernel
parent8ad200d7b7c8fac77cf705831e90e889360d7030 (diff)
parentdc3a9efb5ee89493a42c3365d219e339e4720c2b (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.S18
-rw-r--r--arch/powerpc/kernel/process.c22
-rw-r--r--arch/powerpc/kernel/prom.c2
-rw-r--r--arch/powerpc/kernel/setup_64.c23
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S7
5 files changed, 30 insertions, 42 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index ba30e3177b05..45d81976987f 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1914,24 +1914,6 @@ _GLOBAL(hmt_start_secondary)
1914 blr 1914 blr
1915#endif 1915#endif
1916 1916
1917#if defined(CONFIG_KEXEC) || defined(CONFIG_SMP)
1918_GLOBAL(smp_release_cpus)
1919 /* All secondary cpus are spinning on a common
1920 * spinloop, release them all now so they can start
1921 * to spin on their individual paca spinloops.
1922 * For non SMP kernels, the secondary cpus never
1923 * get out of the common spinloop.
1924 * XXX This does nothing useful on iSeries, secondaries are
1925 * already waiting on their paca.
1926 */
1927 li r3,1
1928 LOADADDR(r5,__secondary_hold_spinloop)
1929 std r3,0(r5)
1930 sync
1931 blr
1932#endif /* CONFIG_SMP */
1933
1934
1935/* 1917/*
1936 * We put a few things here that have to be page-aligned. 1918 * We put a few things here that have to be page-aligned.
1937 * This stuff goes at the beginning of the bss, which is page-aligned. 1919 * 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 8f85dabe4df3..96843211cc5c 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -48,8 +48,8 @@
48#include <asm/prom.h> 48#include <asm/prom.h>
49#ifdef CONFIG_PPC64 49#ifdef CONFIG_PPC64
50#include <asm/firmware.h> 50#include <asm/firmware.h>
51#include <asm/plpar_wrappers.h>
52#include <asm/time.h> 51#include <asm/time.h>
52#include <asm/machdep.h>
53#endif 53#endif
54 54
55extern unsigned long _get_SP(void); 55extern unsigned long _get_SP(void);
@@ -201,27 +201,15 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
201} 201}
202#endif /* CONFIG_SPE */ 202#endif /* CONFIG_SPE */
203 203
204static void set_dabr_spr(unsigned long val)
205{
206 mtspr(SPRN_DABR, val);
207}
208
209int set_dabr(unsigned long dabr) 204int set_dabr(unsigned long dabr)
210{ 205{
211 int ret = 0;
212
213#ifdef CONFIG_PPC64 206#ifdef CONFIG_PPC64
214 if (firmware_has_feature(FW_FEATURE_XDABR)) { 207 if (ppc_md.set_dabr)
215 /* We want to catch accesses from kernel and userspace */ 208 return ppc_md.set_dabr(dabr);
216 unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER;
217 ret = plpar_set_xdabr(dabr, flags);
218 } else if (firmware_has_feature(FW_FEATURE_DABR)) {
219 ret = plpar_set_dabr(dabr);
220 } else
221#endif 209#endif
222 set_dabr_spr(dabr);
223 210
224 return ret; 211 mtspr(SPRN_DABR, dabr);
212 return 0;
225} 213}
226 214
227#ifdef CONFIG_PPC64 215#ifdef CONFIG_PPC64
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 2eccd0e159e3..eec2da695508 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,
1285 1285
1286 endp = reg + (l / sizeof(cell_t)); 1286 endp = reg + (l / sizeof(cell_t));
1287 1287
1288 DBG("memory scan node %s ..., reg size %ld, data: %x %x %x %x, ...\n", 1288 DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
1289 uname, l, reg[0], reg[1], reg[2], reg[3]); 1289 uname, l, reg[0], reg[1], reg[2], reg[3]);
1290 1290
1291 while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { 1291 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 d4a3c5dd1a21..275d86ddd612 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -103,8 +103,6 @@ extern void htab_initialize(void);
103extern void early_init_devtree(void *flat_dt); 103extern void early_init_devtree(void *flat_dt);
104extern void unflatten_device_tree(void); 104extern void unflatten_device_tree(void);
105 105
106extern void smp_release_cpus(void);
107
108int have_of = 1; 106int have_of = 1;
109int boot_cpuid = 0; 107int boot_cpuid = 0;
110int boot_cpuid_phys = 0; 108int boot_cpuid_phys = 0;
@@ -400,6 +398,27 @@ void __init early_setup(unsigned long dt_ptr)
400} 398}
401 399
402 400
401#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
402void smp_release_cpus(void)
403{
404 extern unsigned long __secondary_hold_spinloop;
405
406 DBG(" -> smp_release_cpus()\n");
407
408 /* All secondary cpus are spinning on a common spinloop, release them
409 * all now so they can start to spin on their individual paca
410 * spinloops. For non SMP kernels, the secondary cpus never get out
411 * of the common spinloop.
412 * This is useless but harmless on iSeries, secondaries are already
413 * waiting on their paca spinloops. */
414
415 __secondary_hold_spinloop = 1;
416 mb();
417
418 DBG(" <- smp_release_cpus()\n");
419}
420#endif /* CONFIG_SMP || CONFIG_KEXEC */
421
403/* 422/*
404 * Initialize some remaining members of the ppc64_caches and systemcfg structures 423 * Initialize some remaining members of the ppc64_caches and systemcfg structures
405 * (at least until we get rid of them completely). This is mostly some 424 * (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 d4dfcfbce272..9ceaa7a7bd00 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -1,11 +1,9 @@
1#include <linux/config.h> 1#include <linux/config.h>
2#ifdef CONFIG_PPC64
3#include <asm/page.h> 2#include <asm/page.h>
4#else
5#define PAGE_SIZE 4096
6#endif
7#include <asm-generic/vmlinux.lds.h> 3#include <asm-generic/vmlinux.lds.h>
8 4
5ENTRY(_stext)
6
9#ifdef CONFIG_PPC64 7#ifdef CONFIG_PPC64
10OUTPUT_ARCH(powerpc:common64) 8OUTPUT_ARCH(powerpc:common64)
11jiffies = jiffies_64; 9jiffies = jiffies_64;
@@ -21,6 +19,7 @@ SECTIONS
21 *(.exit.data) 19 *(.exit.data)
22 } 20 }
23 21
22 . = KERNELBASE;
24 23
25 /* Read-only sections, merged into text segment: */ 24 /* Read-only sections, merged into text segment: */
26#ifdef CONFIG_PPC32 25#ifdef CONFIG_PPC32