Message ID | 5874A03A.9000901@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10/01/17 08:50, Tan Xiaojun wrote: > I add this patch, and test in Hisilicon D02/D03. It can work well. > > I'm sorry to reply so late. I took some time to debug, because I am not familiar with the code. > >> + if (level < of_level) { >> + /* >> + * some external caches not specified in CLIDR_EL1 >> + * the information may be available in the device tree >> + * only unified external caches are considered here >> + */ >> + level = of_level; >> + leaves += (of_level - level); > > The above two lines need to exchange the location. > Ah crap, sorry for such a silly mistake. I will post proper patch(es) soon.
On 2017/1/10 18:01, Sudeep Holla wrote: > > > On 10/01/17 08:50, Tan Xiaojun wrote: >> I add this patch, and test in Hisilicon D02/D03. It can work well. >> >> I'm sorry to reply so late. I took some time to debug, because I am not familiar with the code. >> >>> + if (level < of_level) { >>> + /* >>> + * some external caches not specified in CLIDR_EL1 >>> + * the information may be available in the device tree >>> + * only unified external caches are considered here >>> + */ >>> + level = of_level; >>> + leaves += (of_level - level); >> >> The above two lines need to exchange the location. >> > > Ah crap, sorry for such a silly mistake. > I will post proper patch(es) soon. > OK. Wait for your new patch. ^_^ Thanks. Xiaojun.
On 10/01/17 10:54, Tan Xiaojun wrote: > On 2017/1/10 18:01, Sudeep Holla wrote: >> >> >> On 10/01/17 08:50, Tan Xiaojun wrote: >>> I add this patch, and test in Hisilicon D02/D03. It can work well. >>> >>> I'm sorry to reply so late. I took some time to debug, because I am not familiar with the code. >>> >>>> + if (level < of_level) { >>>> + /* >>>> + * some external caches not specified in CLIDR_EL1 >>>> + * the information may be available in the device tree >>>> + * only unified external caches are considered here >>>> + */ >>>> + level = of_level; >>>> + leaves += (of_level - level); >>> >>> The above two lines need to exchange the location. >>> >> >> Ah crap, sorry for such a silly mistake. >> I will post proper patch(es) soon. >> > > OK. Wait for your new patch. ^_^ > Thanks, I have posted the patches[1] and Cc-ed you on them. It would be good to get Tested-by once you check.
On 2017/1/10 19:50, Sudeep Holla wrote: > > > On 10/01/17 10:54, Tan Xiaojun wrote: >> On 2017/1/10 18:01, Sudeep Holla wrote: >>> >>> >>> On 10/01/17 08:50, Tan Xiaojun wrote: >>>> I add this patch, and test in Hisilicon D02/D03. It can work well. >>>> >>>> I'm sorry to reply so late. I took some time to debug, because I am not familiar with the code. >>>> >>>>> + if (level < of_level) { >>>>> + /* >>>>> + * some external caches not specified in CLIDR_EL1 >>>>> + * the information may be available in the device tree >>>>> + * only unified external caches are considered here >>>>> + */ >>>>> + level = of_level; >>>>> + leaves += (of_level - level); >>>> >>>> The above two lines need to exchange the location. >>>> >>> >>> Ah crap, sorry for such a silly mistake. >>> I will post proper patch(es) soon. >>> >> >> OK. Wait for your new patch. ^_^ >> > > Thanks, I have posted the patches[1] and Cc-ed you on them. It would be > good to get Tested-by once you check. > OK. I'm glad to do this. Thanks. Xiaojun.
On 10/01/17 08:50, Tan Xiaojun wrote: [...] > diff --git a/arch/arm64/boot/dts/hisilicon/hip05.dtsi b/arch/arm64/boot/dts/hisilicon/hip05.dtsi > index 4b472a3..aac18c2 100644 > --- a/arch/arm64/boot/dts/hisilicon/hip05.dtsi > +++ b/arch/arm64/boot/dts/hisilicon/hip05.dtsi > @@ -215,18 +215,30 @@ > > cluster0_l2: l2-cache0 { > compatible = "cache"; > + next-level-cache = <&die0_l3c>; > }; > > cluster1_l2: l2-cache1 { > compatible = "cache"; > + next-level-cache = <&die0_l3c>; > }; > > cluster2_l2: l2-cache2 { > compatible = "cache"; > + next-level-cache = <&die0_l3c>; > }; > > cluster3_l2: l2-cache3 { > compatible = "cache"; > + next-level-cache = <&die0_l3c>; > + }; > + > + die0_l3c: l3-cache { > + compatible = "cache"; > + cache-size = <16777216>; > + cache-line-size = <64>; > + cache-block-size = <16>; You need to add cache-level = <3> with v2 patch set to work.
diff --git a/arch/arm64/boot/dts/hisilicon/hip05.dtsi b/arch/arm64/boot/dts/hisilicon/hip05.dtsi index 4b472a3..aac18c2 100644 --- a/arch/arm64/boot/dts/hisilicon/hip05.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hip05.dtsi @@ -215,18 +215,30 @@ cluster0_l2: l2-cache0 { compatible = "cache"; + next-level-cache = <&die0_l3c>; }; cluster1_l2: l2-cache1 { compatible = "cache"; + next-level-cache = <&die0_l3c>; }; cluster2_l2: l2-cache2 { compatible = "cache"; + next-level-cache = <&die0_l3c>; }; cluster3_l2: l2-cache3 { compatible = "cache"; + next-level-cache = <&die0_l3c>; + }; + + die0_l3c: l3-cache { + compatible = "cache"; + cache-size = <16777216>; + cache-line-size = <64>; + cache-block-size = <16>; + cache-sets = <4096>; }; };