summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-20 14:28:54 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-20 14:28:54 -0700
commitc53ab5d56c66816fe06dc6cd0abb93f6dd81a145 (patch)
treeb7226c695fa41388955d864e4f026176917e9442 /arch
parent8acff0a2449aeda37204c4074976bf79f21968e3 (diff)
parentc5f226c7e95bf318879fb6ae02fc0dfb0f6d408c (diff)
downloadlinux-c53ab5d56c66816fe06dc6cd0abb93f6dd81a145.tar.bz2
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix powermac late initcall to only run on powermac [POWERPC] PowerPC: Prevent data exception in kernel space (32-bit)
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/mm/fault.c5
-rw-r--r--arch/powerpc/platforms/powermac/setup.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index bfe901353142..115b25f50bf8 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -279,14 +279,13 @@ good_area:
#endif /* CONFIG_8xx */
if (is_exec) {
-#ifdef CONFIG_PPC64
+#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
/* protection fault */
if (error_code & DSISR_PROTFAULT)
goto bad_area;
if (!(vma->vm_flags & VM_EXEC))
goto bad_area;
-#endif
-#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+#else
pte_t *ptep;
pmd_t *pmdp;
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 956571526a57..7ccb9236e8b4 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -454,6 +454,9 @@ static int initializing = 1;
static int pmac_late_init(void)
{
+ if (!machine_is(powermac))
+ return -ENODEV;
+
initializing = 0;
/* this is udbg (which is __init) and we can later use it during
* cpu hotplug (in smp_core99_kick_cpu) */