From: "Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>
To: linuxppc-dev@lists•ozlabs.org, mpe@ellerman•id.au
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>
Subject: [PATCH v2 4/4] powerpc: Avoid opencoding fixup_real_addr
Date: Sun, 24 May 2020 15:08:22 +0530 [thread overview]
Message-ID: <20200524093822.423487-4-aneesh.kumar@linux.ibm.com> (raw)
In-Reply-To: <20200524093822.423487-1-aneesh.kumar@linux.ibm.com>
Use the newly added helper.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux•ibm.com>
---
arch/powerpc/kernel/traps.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 051d7028e71f..1d58d88a7be1 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -1508,12 +1508,10 @@ void program_check_exception(struct pt_regs *regs)
== NOTIFY_STOP)
goto bail;
- bugaddr = regs->nip;
/*
* Fixup bugaddr for BUG_ON() in real mode
*/
- if (!is_kernel_addr(bugaddr) && !(regs->msr & MSR_IR))
- bugaddr += PAGE_OFFSET;
+ bugaddr = fixup_real_addr(regs, regs->nip);
if (!(regs->msr & MSR_PR) && /* not user-mode */
report_bug(bugaddr, regs) == BUG_TRAP_TYPE_WARN) {
--
2.26.2
next prev parent reply other threads:[~2020-05-24 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-24 9:38 [PATCH v2 1/4] powerpc/instruction_dump: Fix kernel crash with show_instructions Aneesh Kumar K.V
2020-05-24 9:38 ` [PATCH v2 2/4] powerpc/va: Add a __va() variant that doesn't do input validation Aneesh Kumar K.V
2020-05-24 9:38 ` [PATCH v2 3/4] powerpc: Fix instruction dumping to use address value correctly Aneesh Kumar K.V
2020-05-24 9:38 ` Aneesh Kumar K.V [this message]
2020-06-18 12:37 ` [PATCH v2 1/4] powerpc/instruction_dump: Fix kernel crash with show_instructions Michael Ellerman
2022-03-09 17:25 ` Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200524093822.423487-4-aneesh.kumar@linux.ibm.com \
--to=aneesh.kumar@linux$(echo .)ibm.com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mpe@ellerman$(echo .)id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox