Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867AbdFTX22 (ORCPT ); Tue, 20 Jun 2017 19:28:28 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38758 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752425AbdFTX20 (ORCPT ); Tue, 20 Jun 2017 19:28:26 -0400 Date: Tue, 20 Jun 2017 16:28:08 -0700 From: Ram Pai To: Anshuman Khandual Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com Subject: Re: [RFC v2 07/12] powerpc: Macro the mask used for checking DSI exception Reply-To: Ram Pai References: <1497671564-20030-1-git-send-email-linuxram@us.ibm.com> <1497671564-20030-8-git-send-email-linuxram@us.ibm.com> <427a86fa-0f61-43b4-1423-7f78a3fd3cb1@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <427a86fa-0f61-43b4-1423-7f78a3fd3cb1@linux.vnet.ibm.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 17062023-0020-0000-0000-00000C3417F2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007263; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00877654; UDB=6.00437227; IPR=6.00657792; BA=6.00005432; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015904; XFM=3.00000015; UTC=2017-06-20 23:28:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17062023-0021-0000-0000-00005CE1FCBC Message-Id: <20170620232808.GI17588@ram.oc3035372033.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-20_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706200403 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2522 Lines: 61 On Tue, Jun 20, 2017 at 01:44:25PM +0530, Anshuman Khandual wrote: > On 06/17/2017 09:22 AM, Ram Pai wrote: > > Replace the magic number used to check for DSI exception > > with a meaningful value. > > > > Signed-off-by: Ram Pai > > --- > > arch/powerpc/include/asm/reg.h | 9 ++++++++- > > arch/powerpc/kernel/exceptions-64s.S | 2 +- > > 2 files changed, 9 insertions(+), 2 deletions(-) > > > > diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h > > index 7e50e47..2dcb8a1 100644 > > --- a/arch/powerpc/include/asm/reg.h > > +++ b/arch/powerpc/include/asm/reg.h > > @@ -272,16 +272,23 @@ > > #define SPRN_DAR 0x013 /* Data Address Register */ > > #define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */ > > #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ > > +#define DSISR_BIT32 0x80000000 /* not defined */ > > #define DSISR_NOHPTE 0x40000000 /* no translation found */ > > +#define DSISR_PAGEATTR_CONFLT 0x20000000 /* page attribute conflict */ > > +#define DSISR_BIT35 0x10000000 /* not defined */ > > #define DSISR_PROTFAULT 0x08000000 /* protection fault */ > > #define DSISR_BADACCESS 0x04000000 /* bad access to CI or G */ > > #define DSISR_ISSTORE 0x02000000 /* access was a store */ > > #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */ > > -#define DSISR_NOSEGMENT 0x00200000 /* SLB miss */ > > #define DSISR_KEYFAULT 0x00200000 /* Key fault */ > > +#define DSISR_BIT43 0x00100000 /* not defined */ > > #define DSISR_UNSUPP_MMU 0x00080000 /* Unsupported MMU config */ > > #define DSISR_SET_RC 0x00040000 /* Failed setting of R/C bits */ > > #define DSISR_PGDIRFAULT 0x00020000 /* Fault on page directory */ > > +#define DSISR_PAGE_FAULT_MASK (DSISR_BIT32 | \ > > + DSISR_PAGEATTR_CONFLT | \ > > + DSISR_BADACCESS | \ > > + DSISR_BIT43) > > Sorry missed this one. Seems like there are couple of unnecessary > line additions in the subsequent patch which adds the new PKEY > reason code. > > -#define DSISR_PAGE_FAULT_MASK (DSISR_BIT32 | \ > - DSISR_PAGEATTR_CONFLT | \ > - DSISR_BADACCESS | \ > +#define DSISR_PAGE_FAULT_MASK (DSISR_BIT32 | \ > + DSISR_PAGEATTR_CONFLT | \ > + DSISR_BADACCESS | \ > + DSISR_KEYFAULT | \ > DSISR_BIT43) i like to see them separately, one per line. But than you are right. that is not the convention in this file. So will change it accordingly. thanks, RP > > -- Ram Pai