From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH] ARM: l2x0: add L210 write allocate override flag Date: Sun, 31 Mar 2019 01:40:34 -0500 Message-ID: <5ca060e4.1c69fb81.b2f88.98ae@mx.google.com> 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: Content-Disposition: inline In-Reply-To: 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: Linus Walleij Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Russell King - ARM Linux admin , Linux ARM List-Id: devicetree@vger.kernel.org On Mon, Mar 18, 2019 at 11:14:05PM +0100, Linus Walleij wrote: > 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. I'm okay with the property as properties for every last L2x0 register bit pretty much already happened. However, can't you set the bit in the machine desc l2c_aux_val? Rob From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B685BC43381 for ; Sun, 31 Mar 2019 06:41:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83F412183F for ; Sun, 31 Mar 2019 06:41:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l7nzi2LG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83F412183F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Subject:To:From:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0cfzzulfd9EVydq0lb9eMiHHfary5TIDcieSY0i09cU=; b=l7nzi2LGc4mzb1 ZYODgumUqzYmTdcSqRvQJf8Fi0fml+AV5JQFx1FfmhaDo1R2vr5RIPcwH9AN5JU/QgjozRy1z/HxE aw24HnqFkLE28yDoPNweU2oxjuA3vALsBQsc38Dx550pt85EbeYTNoaH+iqmVw+qj15aLdOC/xwQk 6E6AGAhbhuMP4IEF1Ub91ZKSXJn9Q3WI4zmUXL5/e5BORpbNl9Kv80QUJN9+/EG5Fx7B2JRONrppF X38ZZ0L5317dhPmhnQssBksp7xhP8GoJD3+83uPvjlowQSQB89iOQLRl9vs5+PCUC7H/kyAh/ZnCh Z1s/r1oMbcmXaWOrs2uA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAU9w-0007zU-GZ; Sun, 31 Mar 2019 06:41:36 +0000 Received: from mail-pl1-f196.google.com ([209.85.214.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAU8z-0007Ce-Hc for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2019 06:40:41 +0000 Received: by mail-pl1-f196.google.com with SMTP id cv12so2928182plb.9 for ; Sat, 30 Mar 2019 23:40:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:cc:subject:references :mime-version:content-disposition:in-reply-to; bh=kkoYXyFkG5loqugnf7rMqPDl+Z2oyBADB+LLmNT18kw=; b=C3Hoe2ZEGnsjXH3iE4lDfX4CKcArerHV9TS67vP9nirf2ZrOe4SfqLjO5APjlpkCoX zwHpW63Bp5Ft7OBqFSwzcyeWMvRnOyHBCXRdP3nP2ADL/9UipHrp083y5TF4CGxBsZot ijVyYNbQzl+bSTHOMoXjoCs/QPDYEUrAXct96kSxz//PND2Xp2sI62JZCKEfmcPrd9rM AG32ut5JBDOuVL3attW2yY9MjwpMNnv6BT03tr1DqEp7XVDlmrgA6ZuLgZOKkZp4exz6 RJShOwYsUQ7+Uhrzw3RLwN1hMHrvLAxNYJLIs+joHhQ9CYKKXCOq1FAwhx1F6DSueHer mobg== X-Gm-Message-State: APjAAAVWxDfrIrSBziSJwdWtGxjY/lMdxXOw8lf2orgPpWLo5mfNHH7h DaLhM4N4e036HqRkrD3czw== X-Google-Smtp-Source: APXvYqwstK8sM7FpgrIrMh2gszhg6p/QNoEgml+WBdO1tzzKuZ8z7fCM3MM+/j1OstFtz6+kPxpALg== X-Received: by 2002:a17:902:a98b:: with SMTP id bh11mr57775839plb.63.1554014436870; Sat, 30 Mar 2019 23:40:36 -0700 (PDT) Received: from localhost ([210.160.217.68]) by smtp.gmail.com with ESMTPSA id f1sm10102842pgl.35.2019.03.30.23.40.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Mar 2019 23:40:36 -0700 (PDT) Message-ID: <5ca060e4.1c69fb81.b2f88.98ae@mx.google.com> Date: Sun, 31 Mar 2019 01:40:34 -0500 From: Rob Herring To: Linus Walleij Subject: Re: [PATCH] ARM: l2x0: add L210 write allocate override flag References: <20190318083053.24197-1-linus.walleij@linaro.org> <20190318140439.xmfh66mbktpd55l2@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190330_234038_140376_50643FFE X-CRM114-Status: GOOD ( 25.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Russell King - ARM Linux admin , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 18, 2019 at 11:14:05PM +0100, Linus Walleij wrote: > 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. I'm okay with the property as properties for every last L2x0 register bit pretty much already happened. However, can't you set the bit in the machine desc l2c_aux_val? Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel