Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626082

[PATCH 3/5] powerpc/mm: remove a redundant test in do_page_fault()

From Christophe Leroy <christophe.leroy@c-s.fr>
Newsgroups linux.kernel
Subject [PATCH 3/5] powerpc/mm: remove a redundant test in do_page_fault()
Date 2017-04-19 15:00 +0200
Message-ID <txXnc-3yQ-43@gated-at.bofh.it> (permalink)
References <txXnb-3yQ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The result of (trap == 0x400) is already in is_exec.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 9d21e5fd383d..b56bf472db6d 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -213,7 +213,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
 	 * bits we are interested in.  But there are some bits which
 	 * indicate errors in DSISR but can validly be set in SRR1.
 	 */
-	if (trap == 0x400)
+	if (is_exec)
 		error_code &= 0x48200000;
 	else
 		is_write = error_code & DSISR_ISSTORE;
-- 
2.12.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] powerpc/mm: some cleanup of do_page_fault() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-04-19 15:00 +0200
  [PATCH 1/5] powerpc/mm: only call store_updates_sp() on stores in  do_page_fault() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-04-19 15:00 +0200
    Re: [PATCH 1/5] powerpc/mm: only call store_updates_sp() on stores in do_page_fault() "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2017-04-24 11:20 +0200
  [PATCH 2/5] powerpc/mm: split store_updates_sp() in two parts in  do_page_fault() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-04-19 15:00 +0200
    Re: [PATCH 2/5] powerpc/mm: split store_updates_sp() in two parts in do_page_fault() "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2017-04-24 11:20 +0200
  [PATCH 3/5] powerpc/mm: remove a redundant test in do_page_fault() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-04-19 15:00 +0200
  [PATCH 5/5] powerpc/mm: The 8xx doesn't call do_page_fault() for  breakpoints Christophe Leroy <christophe.leroy@c-s.fr> - 2017-04-19 15:00 +0200
  [PATCH 4/5] powerpc/mm: Evaluate user_mode(regs) only once in  do_page_fault() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-04-19 15:00 +0200
    Re: [PATCH 4/5] powerpc/mm: Evaluate user_mode(regs) only once in do_page_fault() "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2017-04-24 11:20 +0200

csiph-web