linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stuebner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: rockchip: Reserve unusable memory region on rk3066
Date: Sat, 01 Oct 2016 21:18:15 +0200	[thread overview]
Message-ID: <6962779.A926KxJite@phil> (raw)
In-Reply-To: <20161001181711.GB17554@remoulade>

Am Samstag, 1. Oktober 2016, 19:17:11 CEST schrieb Mark Rutland:
> Hi,
> 
> On Sat, Oct 01, 2016 at 04:09:39PM +0200, =?UTF-8?q?Pawe=C5=82=20Jarosz?= 
wrote:
> > For some reason accessing memory region above 0xfe000000 freezes
> > system on rk3066. There is similiar bug on later rockchip soc (rk3288)
> > solved same way.
> > 
> > Signed-off-by: Pawe? Jarosz <paweljarosz3691@gmail.com>
> > ---
> > 
> >  arch/arm/boot/dts/rk3066a.dtsi | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/rk3066a.dtsi
> > b/arch/arm/boot/dts/rk3066a.dtsi index 0d0dae3..44c8956 100644
> > --- a/arch/arm/boot/dts/rk3066a.dtsi
> > +++ b/arch/arm/boot/dts/rk3066a.dtsi
> > @@ -93,6 +93,19 @@
> > 
> >  		};
> >  	
> >  	};
> > 
> > +	reserved-memory {
> > +		#address-cells = <1>;
> > +		#size-cells = <1>;
> > +		ranges;
> > +		/*
> > +		 * The rk3066 cannot use the memory area above 0x9F000000
> > +		 * for some unknown reason.
> > +		 */
> > +		unusable at 9F000000 {
> > +			reg = <0x9F000000 0x1000000>;
> > +		};
> 
> I don't think this is a sane workaround, but it is at best difficult to
> tell, given there's no reason given for why this memory is unusable.
> 
> For instance, if bus accesses to this address hang, then this patch only
> makes the hand less likely, since the kernel will still map the region (and
> therefore the CPU can perform speculative accesses).
> 
> Are issues with this memory consistently seen in practice?
> 
> Can you enable CONFIG_MEMTEST and pass 'memtest' to the kernel, to determine
> if the memory is returning erroneous values?

just for the sake of completeness, on the rk3288 the issue was the dma not 
being able to access the specific memory region (interestingly also the last 
16MB but of the 4GB area supported on the rk3288). So memory itself was ok, 
just dma access to it failed.

We didn't find any other sane solution to limit the dma access in a general way 
at the time, so opted for just blocking the memory region (as it was similarly 
only 

In the patch above, the newly blocked area is in the middle of the two 1gb 
memory areas (0x60000000-0xa0000000-1, 0xa0000000-0xe0000000-1).

Pavel, apart from Mark's CONFIG_MEMTEST request above could you also specifiy 
what type of error you see please?


Thanks
Heiko

  reply	other threads:[~2016-10-01 19:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-01 14:09 [PATCH] ARM: dts: rockchip: Reserve unusable memory region on rk3066 =?UTF-8?q?Pawe=C5=82=20Jarosz?=
2016-10-01 18:17 ` Mark Rutland
2016-10-01 19:18   ` Heiko Stuebner [this message]
2016-10-01 19:59     ` Paweł Jarosz
2016-10-03 10:20     ` Mark Rutland
2016-10-03 10:54       ` Heiko Stuebner
2016-10-04 11:56         ` Paweł Jarosz
2016-10-04 18:56           ` Heiko Stübner
2016-10-05  2:27 ` Huang, Tao
2016-10-05  6:09   ` Paweł Jarosz
2016-10-10  7:18     ` Huang, Tao
2016-10-10  9:11       ` Paweł Jarosz
2016-10-13  7:12         ` Huang, Tao
2016-10-13  8:55           ` Paweł Jarosz

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=6962779.A926KxJite@phil \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).