From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933459AbcIEQXn (ORCPT ); Mon, 5 Sep 2016 12:23:43 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:37064 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbcIEQXm (ORCPT ); Mon, 5 Sep 2016 12:23:42 -0400 Date: Mon, 5 Sep 2016 17:22:00 +0100 From: Russell King - ARM Linux To: Stefan Agner Cc: ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, kirill.shutemov@linux.intel.com, l.stach@pengutronix.de, arnd@arndb.de, nicolas.pitre@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: LPAE: initialize cachepolicy correctly Message-ID: <20160905162200.GR1041@n2100.armlinux.org.uk> References: <20160904053331.7264-1-stefan@agner.ch> <20160904220903.GN1041@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 04, 2016 at 04:31:40PM -0700, Stefan Agner wrote: > On 2016-09-04 15:09, Russell King - ARM Linux wrote: > > On Sat, Sep 03, 2016 at 10:33:31PM -0700, Stefan Agner wrote: > >> The cachepolicy variable gets initialized using a masked pmd > >> So far, the pmd has been masked with flags valid for the 2-page > >> table format. In the LPAE case, this lead to a wrong assumption > >> of what the initial cachepolicy has been used. Later a check > >> forces the cache policy to writealloc and prints the following > >> warning: > >> Forcing write-allocate cache policy for SMP > >> > >> This patch uses PMD_SECT_WBWA to mask all cache setting flags. > >> The define represents the complete mask of the cache relevant > >> flags for both page table formats. > > > > PMD_SECT_WBWA is just one possible combination, it's not a bit-mask. > > We need a new definition. > > Agreed, it just happens to be the same as the bit-mask in both > page-table layouts. > > Does PMD_SECT_CACHE_MASK sounds like a reasonable identifier for it? Yep, thanks. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.