Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3361129pxj; Mon, 24 May 2021 05:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDKmfCf4SVZIOXYq8ZuO2g+YDGbJO94eKnS+RtqW1DZpCIdXTa79fbvecE/h0H/i6D2Q8P X-Received: by 2002:a5e:c708:: with SMTP id f8mr15682419iop.198.1621858036945; Mon, 24 May 2021 05:07:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621858036; cv=none; d=google.com; s=arc-20160816; b=vLH9cSn8Cit/kTOt906ievTydYoLyIZ/1yDDsrhky225MyR+JyxGhPQXna13rN+bYj ERB5KyW7z1YAjiH9oXarlrRrVEvAWqJoCj9jquxY0wqui2KBsgvw7aI1Ew72WE2rwMdE lJXobfPnx1f1AbXqD+sGvt7VYLnuLhU9E87DIu+4Et66MTakkXqskfH/w9tchRtQpZ+w MDUd+lrSM8jzM1wB8tiE4HbMwcJ5zY91hzCj2xp8d6rmBWYJcXyOo9NTCmkISBZnLiRk RmDtpxwMFceQ1vxQMMJrT3mGsUo4DY1SCZNz8U4TkStY8WMs58fg3HhOemiNNkCMSF9X hI1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=B8aeFSkBfCHP8xQYcERDXZxqzOyGuBUTFmo72O9U+/w=; b=dOylrjm+fpaMLn4D2WCSFYOM69kOmmXWQLI4zQtqAXXP+jiY15WXtRXTAL8cF95i9S Yl7AY39Zkk2+GmL5HOkvut7CnZRrIRuUJtjqS+3PjZ0E7D0TIYksVsm/SoLMEtiiiH7h x8bH8bo84sWuE5lCOWlbfGdhMMucnmfu8QbhCebqK3KUpMBzaNlCY66zM2sm3HY0ARIi pFdP0n/iujDSGTFGajNwcwtzDkx807ivMtot3St7GnXpDzVXMH+ehXDx+Y5+Acu3Ig32 7+i/Z3xWRTG8+F5Ga9QRb6BLUzRvkubFV6U33G8vzrRmWBXOtcHEEHSo5sdeVSKufjZU Cbgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XIeHN6J3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si14861912jat.121.2021.05.24.05.07.03; Mon, 24 May 2021 05:07:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XIeHN6J3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232476AbhEXMHh (ORCPT + 99 others); Mon, 24 May 2021 08:07:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:51020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232854AbhEXMHY (ORCPT ); Mon, 24 May 2021 08:07:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F01986109F; Mon, 24 May 2021 12:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621857957; bh=85GHMsUoibbHgirlYFFhaTA9Sdo9UthLUckoWESIwSM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XIeHN6J3eAWaPP8M5bI46CAlm6nvOZ8WtHjqWctWWSO1XoS9gXf5yeVC5JjUN+lE8 2kxHbyWu1ykUsYJeBgBARKVEM6FNJ8t5cSkn7ner9tRd5QM5y42iM2c0dLhIWaQiyX kc5QTSTedbmkTi9GCcozYmgnXo5s7nh6aVARp4yDbCGgNF4Oz/sntW4xmdVVM2T9PZ ScX86Bs6brKalY5EzbblPAHaY09ykRnG7cSaMOw/pnqNnP9H+8uORVIpc/+gkCJUEx XDQ02xxZ2jSosM+Q9qRpytm6y5Amrf7pPr3ZvD/NodDWFUAyVMUMl2JPiosY4AP+Dr Z9H4lMOfRvvVQ== Date: Mon, 24 May 2021 13:05:50 +0100 From: Will Deacon To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , Morten Rasmussen , Qais Yousef , Suren Baghdasaryan , Quentin Perret , Tejun Heo , Li Zefan , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , "Rafael J. Wysocki" , kernel-team@android.com Subject: Re: [PATCH v6 02/21] arm64: Allow mismatched 32-bit EL0 support Message-ID: <20210524120550.GA14913@willie-the-truck> References: <20210518094725.7701-1-will@kernel.org> <20210518094725.7701-3-will@kernel.org> <20210521102523.GB6675@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210521102523.GB6675@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 11:25:23AM +0100, Catalin Marinas wrote: > On Tue, May 18, 2021 at 10:47:06AM +0100, Will Deacon wrote: > > +static bool has_32bit_el0(const struct arm64_cpu_capabilities *entry, int scope) > > +{ > > + if (!has_cpuid_feature(entry, scope)) > > + return allow_mismatched_32bit_el0; > > + > > + if (scope == SCOPE_SYSTEM) > > + pr_info("detected: 32-bit EL0 Support\n"); > > + > > + return true; > > +} > > We may have discussed this before: AFAICT this will print 32-bit EL0 > detected even if there's no 32-bit EL0 on any CPU. Should we instead > print 32-bit EL0 detected on CPU X when allow_mismatched_32bit_el0 is > passed? It would also give us an indication of the system configuration > when people start reporting bugs. The function above only runs if we've detected 32-bit support via aa64pfr0_el1, so I think we're ok. We also have a print when we detect the mismatch (see enable_mismatched_32bit_el0()). Will