Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1687612pxb; Mon, 20 Sep 2021 02:55:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+gB4Kcxs7YL1DT0AH1a4nZpBdydcTMthJ2JyyIaMRBYn9BSEFFy50fZob+QIGhzl1ZyXE X-Received: by 2002:a05:6402:2cd:: with SMTP id b13mr28091882edx.267.1632131746641; Mon, 20 Sep 2021 02:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632131746; cv=none; d=google.com; s=arc-20160816; b=avp3hq2658G8xaqE6w7A/pBxOrYDf3EN1zXNsy2r61LbICM4SEOtV9toVKxq9Ta/wA CoHX5+uf34vng8aE/9MBFHAOHS0kwdueqay538MuXuU9hK3KFsDflVSzZR9nfsNBBcOV aNtj8rF0BWc717yA5T7BVPQouGi/+H30qVqluBtUzuiUjq73GBdWTrdjObamcRljmtYe QZ2BtoqJEoMB7WPiAE1VO6zbphsKOiEdfRsPXQbR2o44zQjgbXEK4c4LrDoVYpGuZ01a OGEOc3kJHPzsfhTjklwRzqySDwgsPm4HeBlU4OOoXel9dydsLhmfaPgG9zlgIOnxgmxc d9rQ== 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=2tkRxJuSpa5sVLgOZGbfXkByQRn28aji50fY5ARUDIM=; b=RbAW1vJjEtDjSk6wRMENoTtagMStoiKZVPfKyYBhYBSR02QHVOOsnBITPlM59paAja yC4E+XqQOrdTG45UcplRDh1vfsSbEC2oxkHcUiRsbBWJyL/laZkeNauR9kGZPs09VwZg ShBIey+jjI4PpvsS8KOWIYiwJhlJPYtsewbg+NWSB4UyUUYS9zY30MpGzvj44Z8bmRFl wS44JUQkoDopYzGbKQAItCKRzyFnlKwX4TnxriiUPXrUCMSObz3iO/YDPhex2GUbfsna +vDit+uyqHKIkJ3G2jdNHPa2alHSAdAZpL2drfCqvGuHB7yIvORO3noLg34+fWB1Kkmf ND9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="lr/dGhJ4"; 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 p17si15154305ejn.242.2021.09.20.02.55.23; Mon, 20 Sep 2021 02:55:46 -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="lr/dGhJ4"; 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 S231920AbhITIdt (ORCPT + 99 others); Mon, 20 Sep 2021 04:33:49 -0400 Received: from mail.skyhub.de ([5.9.137.197]:49424 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhITIds (ORCPT ); Mon, 20 Sep 2021 04:33:48 -0400 Received: from zn.tnic (p200300ec2f0a2a0063d0dab944a9c04a.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:2a00:63d0:dab9:44a9:c04a]) (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 E48131EC0287; Mon, 20 Sep 2021 10:32:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1632126737; 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=2tkRxJuSpa5sVLgOZGbfXkByQRn28aji50fY5ARUDIM=; b=lr/dGhJ42eGiTB8pDWnlPVDnNm2fPZ5jL5SqGlyIty/fZvwbUn+NTngjBjcSO9+fLjdQBo 95zGFX+zSWD+9vg8AHugAwdMMF+iKppPjdhWexHAYZAeNiTbDqJ3yFhH3sYfHb0tmBIEHq aFs/JG3yrAd8cq3FbBIgP43WZTo9N6I= Date: Mon, 20 Sep 2021 10:32:11 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: Yazen Ghannam , X86 ML , LKML Subject: Re: [PATCH 3/4] x86/mce: Get rid of msr_ops Message-ID: References: <20210917105355.2368-1-bp@alien8.de> <20210917105355.2368-4-bp@alien8.de> 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 Sun, Sep 19, 2021 at 09:47:51PM -0700, Luck, Tony wrote: > I think this would be easier on the eyeballs with > a couple of helper functions: > > if (mce_flags.smca) > return smca_msr_number(bank, reg); > else > return msr_number(bank, reg); > > with the switch (reg) in each of those helper functions. I'll switch it to if () else but please don't make me add more helper functions. Those MSR defines already have "SMCA" and "IA32" in their names so that should be a good enough differentiation, I'd say. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette