* [PATCH] arm64: dts: uniphier: add /memreserve/ for spin-table release address
@ 2016-04-15 17:58 Masahiro Yamada
[not found] ` <1460743138-17768-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2016-04-15 17:58 UTC (permalink / raw)
To: arm-DgEjT+Ai2ygdnm+yROfE0A
Cc: Masahiro Yamada, devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Rob Herring,
Pawel Moll, Will Deacon, Mark Rutland, Catalin Marinas,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
As Documentation/arm64/booting.txt says, the cpu-release-addr
location should be reserved.
Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
---
arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
index 651c9d9..90909d2 100644
--- a/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
+++ b/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
@@ -42,6 +42,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+/memreserve/ 0x80000100 0x00000008;
+
/ {
compatible = "socionext,ph1-ld20";
#address-cells = <2>;
--
1.9.1
--
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: uniphier: add /memreserve/ for spin-table release address
[not found] ` <1460743138-17768-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
@ 2016-04-18 8:45 ` Mark Rutland
2016-04-18 8:55 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2016-04-18 8:45 UTC (permalink / raw)
To: Masahiro Yamada
Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA,
Kumar Gala, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ian Campbell,
Rob Herring, Pawel Moll, Will Deacon, Catalin Marinas,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Sat, Apr 16, 2016 at 02:58:58AM +0900, Masahiro Yamada wrote:
> As Documentation/arm64/booting.txt says, the cpu-release-addr
> location should be reserved.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> ---
>
> arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
> index 651c9d9..90909d2 100644
> --- a/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
> +++ b/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
> @@ -42,6 +42,8 @@
> * OTHER DEALINGS IN THE SOFTWARE.
> */
>
> +/memreserve/ 0x80000100 0x00000008;
> +
Please add a comment above the memreserve to mention what it is
protecting. That helps to avoid having this cargo-culted to cases where
it is not needed.
I take it that the code for the spin-table is not in RAM, and does not
need to be protected similarly?
Assuming so:
Acked-by: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Thanks,
Mark.
> / {
> compatible = "socionext,ph1-ld20";
> #address-cells = <2>;
> --
> 1.9.1
>
> --
> 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
>
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: uniphier: add /memreserve/ for spin-table release address
2016-04-18 8:45 ` Mark Rutland
@ 2016-04-18 8:55 ` Masahiro Yamada
2016-04-18 9:04 ` Mark Rutland
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2016-04-18 8:55 UTC (permalink / raw)
To: Mark Rutland
Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA,
Kumar Gala, Linux Kernel Mailing List, Ian Campbell, Rob Herring,
Pawel Moll, Will Deacon, Catalin Marinas, linux-arm-kernel
Hi Mark,
2016-04-18 17:45 GMT+09:00 Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>:
> On Sat, Apr 16, 2016 at 02:58:58AM +0900, Masahiro Yamada wrote:
>> As Documentation/arm64/booting.txt says, the cpu-release-addr
>> location should be reserved.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
>> ---
>>
>> arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
>> index 651c9d9..90909d2 100644
>> --- a/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
>> +++ b/arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi
>> @@ -42,6 +42,8 @@
>> * OTHER DEALINGS IN THE SOFTWARE.
>> */
>>
>> +/memreserve/ 0x80000100 0x00000008;
>> +
>
> Please add a comment above the memreserve to mention what it is
> protecting. That helps to avoid having this cargo-culted to cases where
> it is not needed.
OK, will do.
> I take it that the code for the spin-table is not in RAM, and does not
> need to be protected similarly?
I use U-Boot to boot Linux for this board.
The code for the spin-table is on SDRAM, and not protected.
I already recognize this problem.
The difficulty for U-Boot is that
U-Boot relocates itself to the top of the DRAM.
So, it is difficult to predict
where the code will be placed.
I will discuss this issue in the U-Boot ML.
So, My current solution is
pre-fetch the code for the spin-table onto I-cache.
--
Best Regards
Masahiro Yamada
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: uniphier: add /memreserve/ for spin-table release address
2016-04-18 8:55 ` Masahiro Yamada
@ 2016-04-18 9:04 ` Mark Rutland
0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2016-04-18 9:04 UTC (permalink / raw)
To: Masahiro Yamada
Cc: arm, devicetree, Kumar Gala, Linux Kernel Mailing List,
Ian Campbell, Rob Herring, Pawel Moll, Will Deacon,
Catalin Marinas, linux-arm-kernel
On Mon, Apr 18, 2016 at 05:55:14PM +0900, Masahiro Yamada wrote:
> 2016-04-18 17:45 GMT+09:00 Mark Rutland <mark.rutland@arm.com>:
> > I take it that the code for the spin-table is not in RAM, and does not
> > need to be protected similarly?
>
> I use U-Boot to boot Linux for this board.
>
> The code for the spin-table is on SDRAM, and not protected.
>
> I already recognize this problem.
>
> The difficulty for U-Boot is that
> U-Boot relocates itself to the top of the DRAM.
> So, it is difficult to predict
> where the code will be placed.
>
> I will discuss this issue in the U-Boot ML.
Ok, please do.
> So, My current solution is pre-fetch the code for the spin-table onto
> I-cache.
As you are probably aware, this is incredibly unsafe, and very likely to
go wrong. Nothing guarantees that (stale) entries remain in the I-cache.
I would very much advise fixing this ASAP.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-18 9:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 17:58 [PATCH] arm64: dts: uniphier: add /memreserve/ for spin-table release address Masahiro Yamada
[not found] ` <1460743138-17768-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2016-04-18 8:45 ` Mark Rutland
2016-04-18 8:55 ` Masahiro Yamada
2016-04-18 9:04 ` Mark Rutland
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).