Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp875311pxk; Thu, 17 Sep 2020 20:00:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/FXYYO39SOvyNX8aCq1BFSugFe7mt8zBbP24flt65lGl+UWwrdbqxx2G2aFLg2uCldOBs X-Received: by 2002:a17:906:f1d5:: with SMTP id gx21mr31994989ejb.165.1600398058763; Thu, 17 Sep 2020 20:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398058; cv=none; d=google.com; s=arc-20160816; b=NbLe59GTGLbEZz+SjiDLV57Y6/mVKe54TDMwBSflTU6ORgp73iCu2hpoStNkrq92Gp 02NRlergcAI3mXwe1wluU8qfAieDl5Q+ogbuJmHAMto+4b43d4Dk6veiZXAfS1CO8H6B 2nWhg6KANaKzK+huYitljC1/W/gBHcQy4JrYzvcx/Q01SFOiJ+1EMNbSZ+AJTc707LSj wnlUj2ztFpPwsfwhR1tDVRiWmZrHS+I4f+gNkzmhnhI8vHIysDJ+J10Mi8Ve4cDbw2pi //J7qCjOJm8zvfHnyo/+vAFgAdp9TdugF5yY1Zh8Axwe0ZKaDBH+uiv+fg4HMiSnnLBg tt1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0cUGTiG07vo4xNe8EmKYQvXfxjFU96UbZsfQbHeuuxk=; b=YmQhvGHdhNLGpGcBmUO0CiXn060tH1C8/MrNCQnH0Q4Z+CNalRebuWDao+JcpGP4sn MbqZg0896jSVFuTT5bjEJefxlvY6WKaj2k8diJcvAh63O+7mhTv5zokPmZ9M7uARGqLf sKw91/q4QtTCbqdHICIWFVLfuK4bNE7kK8cxRFaK6mkUz5jEjFTC/KXVkuzSU3gZSVrB AqbGXl0mjlKuHH1n74gVBBsaAV07Sztq5pvSEzYnFEmXgHAgdcj2AlyY/4R5xsjbc2RE 8ibci8Lxuw85RJu3f7dj2QgxstPCLmtGk5BKw8l2hQWYFfIdqOwqtOpWUUHqLfmUk/vr uEaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GSvNEMLz; 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 u11si1088869edo.342.2020.09.17.20.00.35; Thu, 17 Sep 2020 20:00:58 -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=default header.b=GSvNEMLz; 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 S1727570AbgIRC6i (ORCPT + 99 others); Thu, 17 Sep 2020 22:58:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:55196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbgIRCGP (ORCPT ); Thu, 17 Sep 2020 22:06:15 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1ADDC238A1; Fri, 18 Sep 2020 02:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394773; bh=aPx4k0HOI9N5ZP/ZtZutImgSKhBYeZLXkzXl59Da648=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GSvNEMLzNHkQCg5/dFKFDE6suVlDCHfkPDyUfnJzmEetKpxCMnFmh7oOgV4fOPHiY Y6vlqnmP4F1nd5Kn65f1UZVH4WCpPLVHVZmRMWCBwtD9dgk/RXLWs2cdxwd2I/scJ+ A1DiKDtpIFVrOIO9NgKXP1Qs0ZrQBLj+wA3qev9I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Will Deacon , Sai Prakash Ranjan , Suzuki K Poulose , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 248/330] arm64: cpufeature: Relax checks for AArch32 support at EL[0-2] Date: Thu, 17 Sep 2020 21:59:48 -0400 Message-Id: <20200918020110.2063155-248-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon [ Upstream commit 98448cdfe7060dd5491bfbd3f7214ffe1395d58e ] We don't need to be quite as strict about mismatched AArch32 support, which is good because the friendly hardware folks have been busy mismatching this to their hearts' content. * We don't care about EL2 or EL3 (there are silly comments concerning the latter, so remove those) * EL1 support is gated by the ARM64_HAS_32BIT_EL1 capability and handled gracefully when a mismatch occurs * EL0 support is gated by the ARM64_HAS_32BIT_EL0 capability and handled gracefully when a mismatch occurs Relax the AArch32 checks to FTR_NONSTRICT. Tested-by: Sai Prakash Ranjan Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20200421142922.18950-8-will@kernel.org Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/cpufeature.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index f400cb29b811a..1df57ffc9314d 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -160,11 +160,10 @@ static const struct arm64_ftr_bits ftr_id_aa64pfr0[] = { ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR0_GIC_SHIFT, 4, 0), S_ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR0_ASIMD_SHIFT, 4, ID_AA64PFR0_ASIMD_NI), S_ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR0_FP_SHIFT, 4, ID_AA64PFR0_FP_NI), - /* Linux doesn't care about the EL3 */ ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL3_SHIFT, 4, 0), - ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL2_SHIFT, 4, 0), - ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL1_SHIFT, 4, ID_AA64PFR0_EL1_64BIT_ONLY), - ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL0_SHIFT, 4, ID_AA64PFR0_EL0_64BIT_ONLY), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL2_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL1_SHIFT, 4, ID_AA64PFR0_EL1_64BIT_ONLY), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64PFR0_EL0_SHIFT, 4, ID_AA64PFR0_EL0_64BIT_ONLY), ARM64_FTR_END, }; @@ -719,9 +718,6 @@ void update_cpu_features(int cpu, taint |= check_update_ftr_reg(SYS_ID_AA64MMFR2_EL1, cpu, info->reg_id_aa64mmfr2, boot->reg_id_aa64mmfr2); - /* - * EL3 is not our concern. - */ taint |= check_update_ftr_reg(SYS_ID_AA64PFR0_EL1, cpu, info->reg_id_aa64pfr0, boot->reg_id_aa64pfr0); taint |= check_update_ftr_reg(SYS_ID_AA64PFR1_EL1, cpu, -- 2.25.1