From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH] ARM: l2x0: add L210 write allocate override flag Date: Mon, 18 Mar 2019 23:14:05 +0100 Message-ID: References: <20190318083053.24197-1-linus.walleij@linaro.org> <20190318140439.xmfh66mbktpd55l2@shell.armlinux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190318140439.xmfh66mbktpd55l2@shell.armlinux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Russell King - ARM Linux admin Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM List-Id: devicetree@vger.kernel.org On Mon, Mar 18, 2019 at 3:04 PM Russell King - ARM Linux admin wrote: > On Mon, Mar 18, 2019 at 09:30:53AM +0100, Linus Walleij wrote: > > This adds support for setting the flag bit "write allocate > > override" to the L210 variant. > > > > The "write allocate override" bit is used on the Nomadik STn8815 > > and is necessary to properly make use of the L210 cache on that > > machine without sporadic crashes. > > > > After this the platform can boot and run without any out-of-tree > > patches. > > This is not something that should be done by the kernel but by the > firmware - needing this bit set is a basic requirement of having > the caches enabled, and if (eg) the boot loader enables the caches > it too will suffer this problem. I see your point. This U-Boot port does not enable the cache, I guess because it was a bit unusual for ARM926EJ-S machines to have L2 cache at the time, and I remember U-Boot was not using L2CC for a long time (maybe still not?). The Nomadik was unstable for years and then I looked at the outoftree vendor kernel and saw that it sets this bit and since I did that it has been rock solid. I can of course try to recompile and reflash the U-Boot for this board but it is stored in NAND flash and if I break it, ugh, I have toasted this board and I only have one. So I'm scared about that. I have been carrying this as an out-of-tree patch for years and I can of course continue to do so, I just felt it was a bit sad so I tried to diet down the previous patch to the single bit the Nomadik needs to set up for it's L2CC to work. Yours, Linus Walleij