From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbdFKWzo (ORCPT ); Sun, 11 Jun 2017 18:55:44 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:59570 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbdFKWzm (ORCPT ); Sun, 11 Jun 2017 18:55:42 -0400 From: Chris Packham To: =?iso-8859-1?Q?Jan_L=FCbbe?= CC: "bp@alien8.de" , "linux-arm-kernel@lists.infradead.org" , "linux-edac@vger.kernel.org" , Rob Herring , Mark Rutland , Russell King , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora Thread-Topic: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora Thread-Index: AQHS4A1S9YoYe6o32kySMibpINKWBg== Date: Sun, 11 Jun 2017 22:55:37 +0000 Message-ID: <220533aeb8f64e829f483e38e209cdc8@svr-chch-ex1.atlnz.lc> References: <20170608041124.4624-1-chris.packham@alliedtelesis.co.nz> <20170608041124.4624-4-chris.packham@alliedtelesis.co.nz> <1496998692.3536.24.camel@pengutronix.de> Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [2001:df5:b000:22:78c1:f648:bf50:be35] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v5BMtm5d031236 On 09/06/17 20:58, Jan Lübbe wrote: > On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote: >> + if (of_property_read_bool(np, "arm,ecc-enable")) { >> + mask |= L2C_AUX_CTRL_EVTMON_ENABLE; >> + val |= L2C_AUX_CTRL_EVTMON_ENABLE; >> + } else if (of_property_read_bool(np, "arm,ecc-disable")) { >> + mask |= L2C_AUX_CTRL_EVTMON_ENABLE; >> + } > > Unless I misunderstand the code in __l2c_init(), the mask is used to > specify the bits to preserve: > old_aux = aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); > aux &= aux_mask; > aux |= aux_val; > > if (old_aux != aux) > pr_warn("L2C: DT/platform modifies aux control register: 0x%08x -> 0x%08x\n", > old_aux, aux); > > So the arm,ecc-disable property will have no effect. This probably also > applies to patch 2/4. The existing property *-disable code removes the > corresponding bit from the mask. Indeed the disable version should be mask &= ~L2C_AUX_CTRL_EVTMON_ENABLE and I was probably a little lazy to have used the L2C EVTMON instead of adding AURORA specific ones like you have in your series. I'll rebase my series on top of yours and send it direct to you so you can include it in the overall submission. > > Regards, > Jan > From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [RFC,3/4] ARM: l2x0: add arm,ecc-enable property for aurora From: Chris Packham Message-Id: <220533aeb8f64e829f483e38e209cdc8@svr-chch-ex1.atlnz.lc> Date: Sun, 11 Jun 2017 22:55:37 +0000 To: =?iso-8859-1?Q?Jan_L=FCbbe?= Cc: "bp@alien8.de" , "linux-arm-kernel@lists.infradead.org" , "linux-edac@vger.kernel.org" , Rob Herring , Mark Rutland , Russell King , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" List-ID: T24gMDkvMDYvMTcgMjA6NTgsIEphbiBMw7xiYmUgd3JvdGU6Cj4gT24gRG8sIDIwMTctMDYtMDgg YXQgMTY6MTEgKzEyMDAsIENocmlzIFBhY2toYW0gd3JvdGU6Cj4+ICsgICAgICAgaWYgKG9mX3By b3BlcnR5X3JlYWRfYm9vbChucCwgImFybSxlY2MtZW5hYmxlIikpIHsKPj4gKyAgICAgICAgICAg ICAgIG1hc2sgfD0gTDJDX0FV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GRpc2FibGUgdmVyc2lvbiBzaG91bGQg YmUgbWFzayAmPSB+TDJDX0FVWF9DVFJMX0VWVE1PTl9FTkFCTEUgCmFuZCBJIHdhcyBwcm9iYWJs eSBhIGxpdHRsZSBsYXp5IHRvIGhhdmUgdXNlZCB0aGUgTDJDIEVWVE1PTiBpbnN0ZWFkIG9mIAph ZGRpbmcgQVVST1JBIHNwZWNpZmljIG9uZXMgbGlrZSB5b3UgaGF2ZSBpbiB5b3VyIHNlcmllcy4K CkknbGwgcmViYXNlIG15IHNlcmllcyBvbiB0b3Agb2YgeW91cnMgYW5kIHNlbmQgaXQgZGlyZWN0 IHRvIHlvdSBzbyB5b3UgCmNhbiBpbmNsdWRlIGl0IGluIHRoZSBvdmVyYWxsIHN1Ym1pc3Npb24u Cgo+IAo+IFJlZ2FyZHMsCj4gSmFuCj4KLS0tClRvIHVuc3Vic2NyaWJlIGZyb20gdGhpcyBsaXN0 OiBzZW5kIHRoZSBsaW5lICJ1bnN1YnNjcmliZSBsaW51eC1lZGFjIiBpbgp0aGUgYm9keSBvZiBh IG1lc3NhZ2UgdG8gbWFqb3Jkb21vQHZnZXIua2VybmVsLm9yZwpNb3JlIG1ham9yZG9tbyBpbmZv IGF0ICBodHRwOi8vdmdlci5rZXJuZWwub3JnL21ham9yZG9tby1pbmZvLmh0bWwK From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Packham Subject: Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora Date: Sun, 11 Jun 2017 22:55:37 +0000 Message-ID: <220533aeb8f64e829f483e38e209cdc8@svr-chch-ex1.atlnz.lc> References: <20170608041124.4624-1-chris.packham@alliedtelesis.co.nz> <20170608041124.4624-4-chris.packham@alliedtelesis.co.nz> <1496998692.3536.24.camel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?iso-8859-1?Q?Jan_L=FCbbe?= Cc: "bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "linux-edac-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Rob Herring , Mark Rutland , Russell King , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org On 09/06/17 20:58, Jan L=FCbbe wrote:=0A= > On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote:=0A= >> + if (of_property_read_bool(np, "arm,ecc-enable")) {=0A= >> + mask |=3D L2C_AUX_CTRL_EVTMON_ENABLE;=0A= >> + val |=3D L2C_AUX_CTRL_EVTMON_ENABLE;=0A= >> + } else if (of_property_read_bool(np, "arm,ecc-disable")) {=0A= >> + mask |=3D L2C_AUX_CTRL_EVTMON_ENABLE;=0A= >> + }=0A= > =0A= > Unless I misunderstand the code in __l2c_init(), the mask is used to=0A= > specify the bits to preserve:=0A= > old_aux =3D aux =3D readl_relaxed(l2x0_base + L2X0_AUX_CTRL);=0A= > aux &=3D aux_mask;=0A= > aux |=3D aux_val;=0A= > =0A= > if (old_aux !=3D aux)=0A= > pr_warn("L2C: DT/platform modifies aux control register:= 0x%08x -> 0x%08x\n",=0A= > old_aux, aux);=0A= > =0A= > So the arm,ecc-disable property will have no effect. This probably also= =0A= > applies to patch 2/4. The existing property *-disable code removes the=0A= > corresponding bit from the mask.=0A= =0A= Indeed the disable version should be mask &=3D ~L2C_AUX_CTRL_EVTMON_ENABLE = =0A= and I was probably a little lazy to have used the L2C EVTMON instead of =0A= adding AURORA specific ones like you have in your series.=0A= =0A= I'll rebase my series on top of yours and send it direct to you so you =0A= can include it in the overall submission.=0A= =0A= > =0A= > Regards,=0A= > Jan=0A= > =0A= =0A= -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris.Packham@alliedtelesis.co.nz (Chris Packham) Date: Sun, 11 Jun 2017 22:55:37 +0000 Subject: [RFC PATCH 3/4] ARM: l2x0: add arm, ecc-enable property for aurora References: <20170608041124.4624-1-chris.packham@alliedtelesis.co.nz> <20170608041124.4624-4-chris.packham@alliedtelesis.co.nz> <1496998692.3536.24.camel@pengutronix.de> Message-ID: <220533aeb8f64e829f483e38e209cdc8@svr-chch-ex1.atlnz.lc> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 09/06/17 20:58, Jan L?bbe wrote: > On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote: >> + if (of_property_read_bool(np, "arm,ecc-enable")) { >> + mask |= L2C_AUX_CTRL_EVTMON_ENABLE; >> + val |= L2C_AUX_CTRL_EVTMON_ENABLE; >> + } else if (of_property_read_bool(np, "arm,ecc-disable")) { >> + mask |= L2C_AUX_CTRL_EVTMON_ENABLE; >> + } > > Unless I misunderstand the code in __l2c_init(), the mask is used to > specify the bits to preserve: > old_aux = aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); > aux &= aux_mask; > aux |= aux_val; > > if (old_aux != aux) > pr_warn("L2C: DT/platform modifies aux control register: 0x%08x -> 0x%08x\n", > old_aux, aux); > > So the arm,ecc-disable property will have no effect. This probably also > applies to patch 2/4. The existing property *-disable code removes the > corresponding bit from the mask. Indeed the disable version should be mask &= ~L2C_AUX_CTRL_EVTMON_ENABLE and I was probably a little lazy to have used the L2C EVTMON instead of adding AURORA specific ones like you have in your series. I'll rebase my series on top of yours and send it direct to you so you can include it in the overall submission. > > Regards, > Jan >