From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Peter Geis <pgwipeout@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>
Subject: Re: [PATCH] arm64: dts: rockchip: Describe PX30 caches
Date: Wed, 4 Dec 2019 16:44:35 +0100 [thread overview]
Message-ID: <20191204164435.2dd1b4fe@xps13> (raw)
In-Reply-To: <CAMdYzYrEmTqvJ6m54EADxLDf70duCtdz3pesV3EZmt67=cbs5g@mail.gmail.com>
Hi Peter,
Peter Geis <pgwipeout@gmail.com> wrote on Wed, 4 Dec 2019 10:36:19
-0500:
> On Wed, Dec 4, 2019 at 5:40 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > PX30 SoCs feature 4 Cortex-A35 CPUs with each of them a L1 data and
> > instruction cache. Both are 32kiB wide (PX30 TRM) and made of 64-bit
> > lines (ARM Cortex-A35 manual). I-cache is 2-way set associative (ARM
> > Cortex-A35 manual), D-cache is 4-way set associative (ARM
> > Cortex-A35manual).
> >
> > An L2 cache is placed after these 4 L1 caches (PX30 TRM), is 256kiB
> > wide (PX30 TRM) and made of 64-bit lines (ARM Cortex-A35 manual) and
> > is 8-way set associative (ARM Cortex-A35 manual).
> >
> > Describe all of them in the PX30 DTSI.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > arch/arm64/boot/dts/rockchip/px30.dtsi | 35 ++++++++++++++++++++++++++
> > 1 file changed, 35 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
> > index 1fd12bd09e83..0e10a224a84b 100644
> > --- a/arch/arm64/boot/dts/rockchip/px30.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
> > @@ -48,6 +48,13 @@
> > cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
> > dynamic-power-coefficient = <90>;
> > operating-points-v2 = <&cpu0_opp_table>;
> > + i-cache-size = <0x8000>;
> > + i-cache-line-size = <64>;
> > + i-cache-sets = <256>;
> > + d-cache-size = <0x8000>;
> > + d-cache-line-size = <64>;
> > + d-cache-sets = <128>;
> > + next-level-cache = <&l2>;
>
> If the i-cache is 2-way associative and the d-cache is 4-way, wouldn't
> that mean these two values are backwards?
Which value are you referring to? Do you mean cache-sets? The following
calculation is my understanding of the situation but it is the first
time I am doing it so I might be totally wrong.
My understanding is that if there are 32768 cache bytes made of 64-byte
lines, so there are 512 lines in both cases.
Then, if the instruction cache is 2-way associative, it means there are
512 / 2 = 256 sets. For the data cache (4-way), it would be 512 / 4 =
128. Am I wrong?
Thanks,
Miquèl
next prev parent reply other threads:[~2019-12-04 15:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 10:39 [PATCH] arm64: dts: rockchip: Describe PX30 caches Miquel Raynal
2019-12-04 15:36 ` Peter Geis
2019-12-04 15:44 ` Miquel Raynal [this message]
2019-12-04 17:14 ` Peter Geis
2019-12-04 17:17 ` Miquel Raynal
2019-12-20 0:55 ` Heiko Stübner
2019-12-23 9:03 ` Miquel Raynal
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=20191204164435.2dd1b4fe@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maxime.chevallier@bootlin.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=pgwipeout@gmail.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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: link
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;
as well as URLs for NNTP newsgroup(s).