Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3433870pxb; Mon, 4 Apr 2022 16:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLCqsFQCixa0BibZYDJ0Cu2XLVD/b9B5Mw/jZLaK/MMQ4v+qpt3fx8s6kcH1sJWHG3nWl2 X-Received: by 2002:aa7:8753:0:b0:4fb:7b8b:44df with SMTP id g19-20020aa78753000000b004fb7b8b44dfmr671664pfo.48.1649116398643; Mon, 04 Apr 2022 16:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649116398; cv=none; d=google.com; s=arc-20160816; b=yQRXTQaTsN2qhsIbKwzzoicYUWDnCBad6JjVMizTX1vFIhxepcd7M5NSYRgO/1jG+7 IV4AEpPMajC7fY0DbR9CUC+GpIuH3Zc0heshw1B8VWiAxJU0fnlZJKxCN/YThTda1lsm DJXfFsmjlEd/WExe9NECt0nJiep08CqCLmM2QLlhoM55fzVAmJeqBO0tWC6bMWgZteua CaWZsu9RqTdh/sJLZwMRaxJvVgCLwoPlDRY95Vmkeaj+gqg2AzsOic5OURmm+24VUV1O 2u6Mnoqmhv06G13MZ0iRtBATFBSI5iG5QyrG65zvl7clI5s69Zlymd5l3/9gVMvL+ZjO tp7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=31OJMjqHClIj9JrX8Y21C+6EHoiVM7Hu/S7vtVGm6hA=; b=iDQoHNaAmJZFrcf2mutRoUxsfqFJyWMsQE0c4qQBiAArf17wtx7tCl3wgIEaMrRp9c vpNHDbolYoxGHQ3s9URjEojQ5rJ9qLL+xPqKhDAPvHyXEWNlH5jGw/t2WQQ9ZUzmDGC4 hEXTa/X2ExnSdMnKy9Z/m1lKZ+kjBiiumo+kvmPd4cCUsjojN0QbGVUbd9S7vJIs+m74 eYvI+eKTSXRo3wWRVVtQB9ELB4a7vVirneU3hrdJzrUBgq4t76q3D8FMUqIjw6nlK+Gw XMzMdwOwsKduKPfdauILeDi28dl8cTt+QLY0NVvqwbUMK7PvaqHYg+freMEAxHtzH8G1 sdIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UuFnoL7F; 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=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 207-20020a6307d8000000b0039905cd17c7si6429489pgh.437.2022.04.04.16.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 16:53:18 -0700 (PDT) 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=@alien8.de header.s=dkim header.b=UuFnoL7F; 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=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 67DBD5DE7E; Mon, 4 Apr 2022 16:36:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358837AbiDCNSx (ORCPT + 99 others); Sun, 3 Apr 2022 09:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358945AbiDCNSX (ORCPT ); Sun, 3 Apr 2022 09:18:23 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E3EDE54; Sun, 3 Apr 2022 06:16:29 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D7DB91EC01B5; Sun, 3 Apr 2022 15:16:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1648991783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=31OJMjqHClIj9JrX8Y21C+6EHoiVM7Hu/S7vtVGm6hA=; b=UuFnoL7FgLyFDuh3Aqtle2b9A9Um6/ORZ1ABQn+mDiLS4P8/+8g6hlaPVItuI8nwV2+Tgu M0yUwVFjQP4iK+hZtcOeRsbOG+V3sh8Pv1NSXQ5WHIZGU2Ha3L6UAL0jlKChuu4C7Ndx10 7Ht9IvWC+snnauTjR6fgKyFsIlnfAZs= Date: Sun, 3 Apr 2022 15:16:20 +0200 From: Borislav Petkov To: Smita Koralahalli Cc: x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Luck , "H . Peter Anvin" , Dave Hansen , James Morse , Robert Richter , Yazen Ghannam Subject: Re: [PATCH v4 2/3] x86/mce: Define function to extract ErrorAddr from MCA_ADDR Message-ID: References: <20220225193342.215780-1-Smita.KoralahalliChannabasappa@amd.com> <20220225193342.215780-3-Smita.KoralahalliChannabasappa@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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=no 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 On Thu, Mar 31, 2022 at 03:24:37PM +0200, Borislav Petkov wrote: > diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c > index 1940d305db1c..a1a4a5dc53e8 100644 > --- a/arch/x86/kernel/cpu/mce/amd.c > +++ b/arch/x86/kernel/cpu/mce/amd.c > @@ -722,6 +722,19 @@ bool amd_mce_is_memory_error(struct mce *m) > return m->bank == 4 && xec == 0x8; > } > > +/* Extract [55:] where lsb is the LS-*valid* bit of the address bits. */ > +void smca_extract_err_addr(struct mce *m) In addition: diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index 9ccc2ea0ea00..4acc7959be6e 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -723,7 +723,7 @@ bool amd_mce_is_memory_error(struct mce *m) } /* Extract [55:] where lsb is the LS-*valid* bit of the address bits. */ -void smca_extract_err_addr(struct mce *m) +void __always_inline smca_extract_err_addr(struct mce *m) { u8 lsb; because some compilers cause: vmlinux.o: warning: objtool: mce_read_aux()+0x82: call to smca_extract_err_addr() leaves .noinstr.text section -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette