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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1584DCDB47E for ; Fri, 13 Oct 2023 10:54:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1QK29Iq8uDfxnzRyc4w8EDktRU79/I2Rk3tsyOOnwHs=; b=pfP99zDjI8L6XW SsZ4B63WGa6Zj26xJTeg8hoM/5sab8dyXhcD40xNCqMnZkTdNNiBHh3WWjK2/HxW7VOlymVHmjtCT 0ydPlcT8aqy+Y6QDXPuvbvG7oL0448gHBPdYf4nGmDE9PYJ2mxNoWlChPoMbOQmTmsHBoCglq11f5 LWQWjMGA7IwIgeJMq5m7+AKsLDHTGHXE+4CBJQQh41ofMgmjm7T2FmkHbn/PayJMWThIsO4WA1js6 RiJ4qqtIyDIidoqgZu9V7DtoAZWB1+Sza3iteILQs9VY44noA0Uw0OT3V7zEwZ9AmEstDRT/NurLz s2i3n8h/kRNh2SVh01SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrFo8-003FMd-1v; Fri, 13 Oct 2023 10:54:16 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrFo4-003FLY-2h for linux-arm-kernel@lists.infradead.org; Fri, 13 Oct 2023 10:54:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AFF4E11FB; Fri, 13 Oct 2023 03:54:45 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.81.31]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 972663F7A6; Fri, 13 Oct 2023 03:54:02 -0700 (PDT) Date: Fri, 13 Oct 2023 11:53:53 +0100 From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com Cc: ardb@kernel.org, bertrand.marquis@arm.com, boris.ostrovsky@oracle.com, broonie@kernel.org, daniel.lezcano@linaro.org, james.morse@arm.com, jgross@suse.com, kristina.martsenko@arm.com, maz@kernel.org, oliver.upton@linux.dev, pcc@google.com, sstabellini@kernel.org, suzuki.poulose@arm.com, tglx@linutronix.de, vladimir.murzin@arm.com, will@kernel.org Subject: Re: [PATCH v3 33/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_1742098 Message-ID: References: <20231010103139.3113421-1-mark.rutland@arm.com> <20231010103139.3113421-34-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231010103139.3113421-34-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231013_035412_924099_2F87CC7C X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 10, 2023 at 11:31:34AM +0100, Mark Rutland wrote: > static void elf_hwcap_fixup(void) > { > -#ifdef CONFIG_ARM64_ERRATUM_1742098 > - if (cpus_have_const_cap(ARM64_WORKAROUND_1742098)) > + if (cpus_have_cap(ARM64_WORKAROUND_1742098)) > compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES; > -#endif /* ARM64_ERRATUM_1742098 */ > } The kbuild test robot pointed out that this is broken for CONFIG_COMPAT=n, since compat_elf_hwcap2 is only defined when CONFIG_COMPAT=y. As CONFIG_ARM64_ERRATUM_1742098 depends on CONFIG_COMPAT, this worked prior to this patch. I've changed that locally to: | static void elf_hwcap_fixup(void) | { | #ifdef CONFIG_COMPAT | if (cpus_have_cap(ARM64_WORKAROUND_1742098)) | compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES; | #endif /* CONFIG_COMPAT */ | } ... since the ifdeffery is protecting the use of 'compat_elf_hwcap2', and the cpucap is now elided by virtue of cpucap_is_possible(). Catalin, aside from the minor fixup above, are you happy to pick this for v6.7? I can post a v4 with that change (and the commit message updated accordingly). Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel