From: Chris Packham <Chris.Packham@alliedtelesis.co.nz> To: "christophe.leroy@c-s.fr" <christophe.leroy@c-s.fr>, "paulus@samba.org" <paulus@samba.org>, "mpe@ellerman.id.au" <mpe@ellerman.id.au>, "benh@kernel.crashing.org" <benh@kernel.crashing.org>, "oss@buserror.net" <oss@buserror.net>, "tglx@linutronix.de" <tglx@linutronix.de> Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Hamish Martin <Hamish.Martin@alliedtelesis.co.nz> Subject: Re: [PATCH v2] powerpc/setup_64: Set cache-line-size based on cache-block-size Date: Thu, 16 Apr 2020 04:36:29 +0000 [thread overview] Message-ID: <343c0e8b01ab74481e0b8dfbe588b1c84127a487.camel@alliedtelesis.co.nz> (raw) In-Reply-To: <20200325031854.7625-1-chris.packham@alliedtelesis.co.nz> Hi All, On Wed, 2020-03-25 at 16:18 +1300, Chris Packham wrote: > If {i,d}-cache-block-size is set and {i,d}-cache-line-size is not, > use > the block-size value for both. Per the devicetree spec cache-line- > size > is only needed if it differs from the block size. > > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> > --- > It looks as though the bsizep = lsizep is not required per the spec > but it's > probably safer to retain it. > > Changes in v2: > - Scott pointed out that u-boot should be filling in the cache > properties > (which it does). But it does not specify a cache-line-size because > it > provides a cache-block-size and the spec says you don't have to if > they are > the same. So the error is in the parsing not in the devicetree > itself. > Ping? This thread went kind of quiet. > arch/powerpc/kernel/setup_64.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/powerpc/kernel/setup_64.c > b/arch/powerpc/kernel/setup_64.c > index e05e6dd67ae6..dd8a238b54b8 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -516,6 +516,8 @@ static bool __init parse_cache_info(struct > device_node *np, > lsizep = of_get_property(np, propnames[3], NULL); > if (bsizep == NULL) > bsizep = lsizep; > + if (lsizep == NULL) > + lsizep = bsizep; > if (lsizep != NULL) > lsize = be32_to_cpu(*lsizep); > if (bsizep != NULL)
WARNING: multiple messages have this Message-ID (diff)
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz> To: "christophe.leroy@c-s.fr" <christophe.leroy@c-s.fr>, "paulus@samba.org" <paulus@samba.org>, "mpe@ellerman.id.au" <mpe@ellerman.id.au>, "benh@kernel.crashing.org" <benh@kernel.crashing.org>, "oss@buserror.net" <oss@buserror.net>, "tglx@linutronix.de" <tglx@linutronix.de> Cc: Hamish Martin <Hamish.Martin@alliedtelesis.co.nz>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v2] powerpc/setup_64: Set cache-line-size based on cache-block-size Date: Thu, 16 Apr 2020 04:36:29 +0000 [thread overview] Message-ID: <343c0e8b01ab74481e0b8dfbe588b1c84127a487.camel@alliedtelesis.co.nz> (raw) In-Reply-To: <20200325031854.7625-1-chris.packham@alliedtelesis.co.nz> Hi All, On Wed, 2020-03-25 at 16:18 +1300, Chris Packham wrote: > If {i,d}-cache-block-size is set and {i,d}-cache-line-size is not, > use > the block-size value for both. Per the devicetree spec cache-line- > size > is only needed if it differs from the block size. > > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> > --- > It looks as though the bsizep = lsizep is not required per the spec > but it's > probably safer to retain it. > > Changes in v2: > - Scott pointed out that u-boot should be filling in the cache > properties > (which it does). But it does not specify a cache-line-size because > it > provides a cache-block-size and the spec says you don't have to if > they are > the same. So the error is in the parsing not in the devicetree > itself. > Ping? This thread went kind of quiet. > arch/powerpc/kernel/setup_64.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/powerpc/kernel/setup_64.c > b/arch/powerpc/kernel/setup_64.c > index e05e6dd67ae6..dd8a238b54b8 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -516,6 +516,8 @@ static bool __init parse_cache_info(struct > device_node *np, > lsizep = of_get_property(np, propnames[3], NULL); > if (bsizep == NULL) > bsizep = lsizep; > + if (lsizep == NULL) > + lsizep = bsizep; > if (lsizep != NULL) > lsize = be32_to_cpu(*lsizep); > if (bsizep != NULL)
next prev parent reply other threads:[~2020-04-16 4:36 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-24 21:36 [PATCH] powerpc/fsl: Add cache properties for T2080/T2081 Chris Packham 2020-03-24 21:36 ` Chris Packham 2020-03-25 1:59 ` Michael Ellerman 2020-03-25 1:59 ` Michael Ellerman 2020-03-25 2:08 ` Scott Wood 2020-03-25 2:08 ` Scott Wood 2020-03-25 2:38 ` Chris Packham 2020-03-25 2:38 ` Chris Packham 2020-03-25 2:50 ` Chris Packham 2020-03-25 2:50 ` Chris Packham 2020-03-25 3:18 ` [PATCH v2] powerpc/setup_64: Set cache-line-size based on cache-block-size Chris Packham 2020-03-25 3:18 ` Chris Packham 2020-04-16 4:36 ` Chris Packham [this message] 2020-04-16 4:36 ` Chris Packham 2020-04-16 11:43 ` Michael Ellerman 2020-04-16 11:43 ` Michael Ellerman 2020-04-16 21:28 ` Chris Packham 2020-04-16 21:28 ` Chris Packham 2020-04-20 2:53 ` Michael Ellerman 2020-04-20 2:53 ` Michael Ellerman
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=343c0e8b01ab74481e0b8dfbe588b1c84127a487.camel@alliedtelesis.co.nz \ --to=chris.packham@alliedtelesis.co.nz \ --cc=Hamish.Martin@alliedtelesis.co.nz \ --cc=benh@kernel.crashing.org \ --cc=christophe.leroy@c-s.fr \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mpe@ellerman.id.au \ --cc=oss@buserror.net \ --cc=paulus@samba.org \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.