diff options
Diffstat (limited to 'arch/ppc64/mm')
| -rw-r--r-- | arch/ppc64/mm/fault.c | 31 | ||||
| -rw-r--r-- | arch/ppc64/mm/hash_low.S | 2 | ||||
| -rw-r--r-- | arch/ppc64/mm/init.c | 4 | ||||
| -rw-r--r-- | arch/ppc64/mm/slb_low.S | 2 |
4 files changed, 29 insertions, 10 deletions
diff --git a/arch/ppc64/mm/fault.c b/arch/ppc64/mm/fault.c index 772f0714a5b7..7fbc68bbb739 100644 --- a/arch/ppc64/mm/fault.c +++ b/arch/ppc64/mm/fault.c | |||
| @@ -77,6 +77,28 @@ static int store_updates_sp(struct pt_regs *regs) | |||
| 77 | return 0; | 77 | return 0; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | static void do_dabr(struct pt_regs *regs, unsigned long error_code) | ||
| 81 | { | ||
| 82 | siginfo_t info; | ||
| 83 | |||
| 84 | if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code, | ||
| 85 | 11, SIGSEGV) == NOTIFY_STOP) | ||
| 86 | return; | ||
| 87 | |||
| 88 | if (debugger_dabr_match(regs)) | ||
| 89 | return; | ||
| 90 | |||
| 91 | /* Clear the DABR */ | ||
| 92 | set_dabr(0); | ||
| 93 | |||
| 94 | /* Deliver the signal to userspace */ | ||
| 95 | info.si_signo = SIGTRAP; | ||
| 96 | info.si_errno = 0; | ||
| 97 | info.si_code = TRAP_HWBKPT; | ||
| 98 | info.si_addr = (void __user *)regs->nip; | ||
| 99 | force_sig_info(SIGTRAP, &info, current); | ||
| 100 | } | ||
| 101 | |||
| 80 | /* | 102 | /* |
| 81 | * The error_code parameter is | 103 | * The error_code parameter is |
| 82 | * - DSISR for a non-SLB data access fault, | 104 | * - DSISR for a non-SLB data access fault, |
| @@ -111,12 +133,9 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, | |||
| 111 | if (!user_mode(regs) && (address >= TASK_SIZE)) | 133 | if (!user_mode(regs) && (address >= TASK_SIZE)) |
| 112 | return SIGSEGV; | 134 | return SIGSEGV; |
| 113 | 135 | ||
| 114 | if (error_code & DSISR_DABRMATCH) { | 136 | if (error_code & DSISR_DABRMATCH) { |
| 115 | if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code, | 137 | do_dabr(regs, error_code); |
| 116 | 11, SIGSEGV) == NOTIFY_STOP) | 138 | return 0; |
| 117 | return 0; | ||
| 118 | if (debugger_dabr_match(regs)) | ||
| 119 | return 0; | ||
| 120 | } | 139 | } |
| 121 | 140 | ||
| 122 | if (in_atomic() || mm == NULL) { | 141 | if (in_atomic() || mm == NULL) { |
diff --git a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S index 35eb49e1b890..ee5a5d36bfa8 100644 --- a/arch/ppc64/mm/hash_low.S +++ b/arch/ppc64/mm/hash_low.S | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
| 17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
| 18 | #include <asm/ppc_asm.h> | 18 | #include <asm/ppc_asm.h> |
| 19 | #include <asm/offsets.h> | 19 | #include <asm/asm-offsets.h> |
| 20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
| 21 | 21 | ||
| 22 | .text | 22 | .text |
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index a14ab87df491..c2157c9c3acb 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
| @@ -554,12 +554,12 @@ void __init do_init_bootmem(void) | |||
| 554 | * present. | 554 | * present. |
| 555 | */ | 555 | */ |
| 556 | for (i=0; i < lmb.memory.cnt; i++) | 556 | for (i=0; i < lmb.memory.cnt; i++) |
| 557 | free_bootmem(lmb_start_pfn(&lmb.memory, i), | 557 | free_bootmem(lmb.memory.region[i].base, |
| 558 | lmb_size_bytes(&lmb.memory, i)); | 558 | lmb_size_bytes(&lmb.memory, i)); |
| 559 | 559 | ||
| 560 | /* reserve the sections we're already using */ | 560 | /* reserve the sections we're already using */ |
| 561 | for (i=0; i < lmb.reserved.cnt; i++) | 561 | for (i=0; i < lmb.reserved.cnt; i++) |
| 562 | reserve_bootmem(lmb_start_pfn(&lmb.reserved, i), | 562 | reserve_bootmem(lmb.reserved.region[i].base, |
| 563 | lmb_size_bytes(&lmb.reserved, i)); | 563 | lmb_size_bytes(&lmb.reserved, i)); |
| 564 | 564 | ||
| 565 | for (i=0; i < lmb.memory.cnt; i++) | 565 | for (i=0; i < lmb.memory.cnt; i++) |
diff --git a/arch/ppc64/mm/slb_low.S b/arch/ppc64/mm/slb_low.S index 698d6b9ed6d1..a3a03da503bc 100644 --- a/arch/ppc64/mm/slb_low.S +++ b/arch/ppc64/mm/slb_low.S | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include <asm/page.h> | 21 | #include <asm/page.h> |
| 22 | #include <asm/mmu.h> | 22 | #include <asm/mmu.h> |
| 23 | #include <asm/ppc_asm.h> | 23 | #include <asm/ppc_asm.h> |
| 24 | #include <asm/offsets.h> | 24 | #include <asm/asm-offsets.h> |
| 25 | #include <asm/cputable.h> | 25 | #include <asm/cputable.h> |
| 26 | 26 | ||
| 27 | /* void slb_allocate(unsigned long ea); | 27 | /* void slb_allocate(unsigned long ea); |
