Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1345254pxb; Thu, 28 Oct 2021 01:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzA5zCksW8nKmy8RjyZwFRx27WyDYHKDG0fD1+pxN1vMEP8CpooAnORqkxuHViXaQElryw1 X-Received: by 2002:a05:6a00:1903:b0:47c:34c1:c6b6 with SMTP id y3-20020a056a00190300b0047c34c1c6b6mr2931544pfi.17.1635411317857; Thu, 28 Oct 2021 01:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635411317; cv=none; d=google.com; s=arc-20160816; b=EmLE53Z9/6hobiHEmzjtQJbYDQPJ67H1HtRRppr5QDUR2aBEtzLTFQbgeMDlSRyy7a 8F8zH32S2JQWagfM8oa0zfIRTAxWzrjd48HljNGVSZyAmrDFocVF4e1iC368Z+XcWEh8 pfZws8QotWkGqepxvNBzvJxlRG8WiVR2XJoDQ8OLJmicIZ2AMW0GQhLXvE/BJpVpptya 8/OQkXWY3jZjm2k1rxXuuvvvJFZer2Z4WXy5UpFBAj30QM8EyhHcU+5c39rrBpnYweyO R86HpSL7zpIYvDFQ2KntKe5ULL38XPgNm7SMHM7L4hhEIaMvQnvtRRCIz6/9W6XsXro7 P3GA== 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=DvOoyo1XKHGob7k4rSognbYB+jQykBxHt0HYpc/zPoA=; b=mKJiSd3qxtb9BSGXQ9hLXGZtpuFUN8z3VtCUj06wtEwakS6CmcEGFidV2izIgV4BZQ IARhnuXkOmp6SJAyzygsZh1cVizmzMV/Ar1vy8/X5dPOk67PxUBTtuEpVyFX9koi1Z9u lqpkOFlrI3YqqGUle1QeIBhOsi4YmFoJNGROUJYs4CaFJvfsSgLS38YLFnfJAuqPXfNo cHAc9F4HMPukDFNnDZzp0cUYX1MMk1k0hjbvqdLhtTEaTrKP/dmC3nH4jnqIF5mKJBWK FRQUh+Y3mxZDRhFmjvmKwwqawmoPkDZDbEXCN4GM7ghNGkwOVY00jsnCp5YwWMJW5zJg kmOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BnJCKIF8; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si3682311pgm.599.2021.10.28.01.55.04; Thu, 28 Oct 2021 01:55:17 -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=@alien8.de header.s=dkim header.b=BnJCKIF8; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbhJ1I4B (ORCPT + 99 others); Thu, 28 Oct 2021 04:56:01 -0400 Received: from mail.skyhub.de ([5.9.137.197]:35542 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbhJ1I4B (ORCPT ); Thu, 28 Oct 2021 04:56:01 -0400 Received: from zn.tnic (p200300ec2f13a70055babd09551bec66.dip0.t-ipconnect.de [IPv6:2003:ec:2f13:a700:55ba:bd09:551b:ec66]) (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 30ED21EC064E; Thu, 28 Oct 2021 10:53:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1635411213; 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=DvOoyo1XKHGob7k4rSognbYB+jQykBxHt0HYpc/zPoA=; b=BnJCKIF8hrw+iAYzJ+fAEZncz37ov25IOg48XjNMdoJbPaAv39XJ7dUfwOiUU+/Swxx5Z7 6IHfedl0l9M2kwjHOXD1LEjAXa67u818TdjcyT5QlK1FhHDbRf2Hv3rr/v8dhqi6Ttgupu 2QgNXkpaTgvriXD06njphmzyp4qqKa8= Date: Thu, 28 Oct 2021 10:53:28 +0200 From: Borislav Petkov To: "Koralahalli Channabasappa, Smita" Cc: Smita Koralahalli , x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Luck , "H . Peter Anvin" , yazen.ghannam@amd.com Subject: Re: [PATCH v2 3/5] x86/mce: Use mca_msr_reg() in prepare_msrs() Message-ID: References: <20211019233641.140275-1-Smita.KoralahalliChannabasappa@amd.com> <20211019233641.140275-4-Smita.KoralahalliChannabasappa@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 27, 2021 at 03:19:51PM -0500, Koralahalli Channabasappa, Smita wrote: > Multiple initialization here I mean: Initializing the MCA registers twice. > Prior to mca_msr_reg() replacement, the MCA registers were initialized > separately for SMCA and legacy processors. However, this is not required > after replacing with mca_msr_reg() as it does the job of returning the > proper MSR addresses. You mean, there was a simple if-else statement if (SMCA) prepare MSRs else prepare MSRs for !SMCA which did the init for each type of system in one go. But frankly, your change doesn't make it more readable but less - you have a goto label now and another SMCA feature check at the end. Vs a simple if-else which is trivial to read. So I don't see any advantage in this change. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette