Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp742617pxp; Fri, 11 Mar 2022 13:57:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOSs3HhoZB3975cd3aC/EYK7dQ5bTq53BGQUC5JKQc3V43DRQ2Bs979bdlHdd5mf9SOW4B X-Received: by 2002:a17:903:18a:b0:151:af32:6139 with SMTP id z10-20020a170903018a00b00151af326139mr12263711plg.86.1647035869208; Fri, 11 Mar 2022 13:57:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647035869; cv=none; d=google.com; s=arc-20160816; b=0oJtwkJranJOMB504UBG885nYnMVLKtgOsawiHUwLaPrj/ng/pd91XIdYR6pjRFCa6 0VxMjeQAgnmr+UqNOLeZqA+Ck79UwTZ+9PauZWCmhEnTcz3Am34eVrqE5WdyknGuieyo fxAEKn58sibQEv/u8LgKNJ7Wk6FhqN6VV2ksf7ogH3wnIuninCIMqszcUI3Kq9TqOhtQ t3dhQ3Q/qfJUvuTV4ah4At75CEcVODOqb5A4G6w5lchxTruh8bLNalw8Bv/DDDFfuo4r 5fGjtKXYNzK0KHzJ7qDT5umCLNmqkJAoJ8eI7up6daUo2FBsOBhMljgTZZAMBh4jHSKq +EMg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sdEJbb7ITRQNq1rycwfcG6N7DAXM4kZpjpo+zATEpmc=; b=DDzca48MDKSYa9Ap1iLAJOhlOc43Y+5w98yLmaE1UTK731WLfbTEcz3NXbNplJcLS7 IDXOR7nGQwXrqZuT9V04VQrS+D23ltJTKTxafavSdC1vs3YH+KX4x+Y6NqAOkBSgs+6M IVhTEH+ejuKqHPDXOZdY09DEUoVzKXuUS7mnxg/YfHCDacjcXLqRjgEMDAUaRoWixuiM mswu5IvUFZra8uencMg4FSy3rxP/Z4hVQUcfAYlrJk4pIf9GyiufrQ9/mBO4RRf+Lmz9 tr5/K19JTlXuGyGWTzas41wOAchdCT9LWwZq6yhfY5Y+afsNpOLY1FgjT2Rpa8bDsqxv wm5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CWWhKvds; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q4-20020a632a04000000b0037c4fe48d4bsi8938598pgq.268.2022.03.11.13.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 13:57:49 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CWWhKvds; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC9392BA0AE; Fri, 11 Mar 2022 13:14:54 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244391AbiCJOnw (ORCPT + 99 others); Thu, 10 Mar 2022 09:43:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344053AbiCJObj (ORCPT ); Thu, 10 Mar 2022 09:31:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E637FEC5EA; Thu, 10 Mar 2022 06:29:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 28BDE61C0A; Thu, 10 Mar 2022 14:29:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DDD7C340E8; Thu, 10 Mar 2022 14:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646922576; bh=EPZxsixiCZjs6ziUXvhGG6X9Ka3rBtJn1D845WN6Y/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CWWhKvds4FQV0bs4Bvz6qA8pbgd8vdo6+knlGoWXXITM+0TfXxVeEKveZfmjHeLSi jb/8IgBw3pmJI6I1OII3zwCkoQmgXgm+LJaThe+g7HF9eSaVm0FDvwNhD0W8M94zmh iGLtv8j/TIxbH/V4tu6rTEvRNgHV8Bw0sInymTLg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Russell King (Oracle)" , Catalin Marinas , James Morse Subject: [PATCH 5.15 23/58] arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit Date: Thu, 10 Mar 2022 15:19:12 +0100 Message-Id: <20220310140813.650924197@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220310140812.983088611@linuxfoundation.org> References: <20220310140812.983088611@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Morse commit 1b33d4860deaecf1d8eec3061b7e7ed7ab0bae8d upstream. The spectre-v4 sequence includes an SMC from the assembly entry code. spectre_v4_patch_fw_mitigation_conduit is the patching callback that generates an HVC or SMC depending on the SMCCC conduit type. As this isn't specific to spectre-v4, rename it smccc_patch_fw_mitigation_conduit so it can be re-used. Reviewed-by: Russell King (Oracle) Reviewed-by: Catalin Marinas Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/entry.S | 2 +- arch/arm64/kernel/proton-pack.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -118,7 +118,7 @@ alternative_cb_end tbnz \tmp2, #TIF_SSBD, .L__asm_ssbd_skip\@ mov w0, #ARM_SMCCC_ARCH_WORKAROUND_2 mov w1, #\state -alternative_cb spectre_v4_patch_fw_mitigation_conduit +alternative_cb smccc_patch_fw_mitigation_conduit nop // Patched to SMC/HVC #0 alternative_cb_end .L__asm_ssbd_skip\@: --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -554,9 +554,9 @@ void __init spectre_v4_patch_fw_mitigati * Patch a NOP in the Spectre-v4 mitigation code with an SMC/HVC instruction * to call into firmware to adjust the mitigation state. */ -void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt, - __le32 *origptr, - __le32 *updptr, int nr_inst) +void __init smccc_patch_fw_mitigation_conduit(struct alt_instr *alt, + __le32 *origptr, + __le32 *updptr, int nr_inst) { u32 insn;