diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-20 17:28:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-20 17:28:54 -0400 |
commit | c53ab5d56c66816fe06dc6cd0abb93f6dd81a145 (patch) | |
tree | b7226c695fa41388955d864e4f026176917e9442 | |
parent | 8acff0a2449aeda37204c4074976bf79f21968e3 (diff) | |
parent | c5f226c7e95bf318879fb6ae02fc0dfb0f6d408c (diff) |
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)
-rw-r--r-- | arch/powerpc/mm/fault.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 3 |
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: | |||
279 | #endif /* CONFIG_8xx */ | 279 | #endif /* CONFIG_8xx */ |
280 | 280 | ||
281 | if (is_exec) { | 281 | if (is_exec) { |
282 | #ifdef CONFIG_PPC64 | 282 | #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) |
283 | /* protection fault */ | 283 | /* protection fault */ |
284 | if (error_code & DSISR_PROTFAULT) | 284 | if (error_code & DSISR_PROTFAULT) |
285 | goto bad_area; | 285 | goto bad_area; |
286 | if (!(vma->vm_flags & VM_EXEC)) | 286 | if (!(vma->vm_flags & VM_EXEC)) |
287 | goto bad_area; | 287 | goto bad_area; |
288 | #endif | 288 | #else |
289 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | ||
290 | pte_t *ptep; | 289 | pte_t *ptep; |
291 | pmd_t *pmdp; | 290 | pmd_t *pmdp; |
292 | 291 | ||
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; | |||
454 | 454 | ||
455 | static int pmac_late_init(void) | 455 | static int pmac_late_init(void) |
456 | { | 456 | { |
457 | if (!machine_is(powermac)) | ||
458 | return -ENODEV; | ||
459 | |||
457 | initializing = 0; | 460 | initializing = 0; |
458 | /* this is udbg (which is __init) and we can later use it during | 461 | /* this is udbg (which is __init) and we can later use it during |
459 | * cpu hotplug (in smp_core99_kick_cpu) */ | 462 | * cpu hotplug (in smp_core99_kick_cpu) */ |