Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp280785pxm; Tue, 22 Feb 2022 10:28:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7Ux/w7OT42KHkeq722BWCPT6qKy1riHVzwJAuoyubzUhLtg1fLh9RRJokSzTyONCl6GWg X-Received: by 2002:a05:6402:5248:b0:410:a105:49 with SMTP id t8-20020a056402524800b00410a1050049mr27873905edd.214.1645554480682; Tue, 22 Feb 2022 10:28:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645554480; cv=none; d=google.com; s=arc-20160816; b=LGCClfk6fk0UiZXkhkMeB90KjNkxs8pVQW14TawkdWZV5xnFuM2lCu8LalU2TiZ5W6 9Lrv5aGcUugGz6y2J94hHEqA9GrF45j5flWiy2q+Am4/GN4Rgs6M5aVhCiE1OFHLp0Vi eQ3wTeimjUqKdrkkTDiH+GgVt32kQ7NmYs1H7Bz3gKrEZ7258JE3TKmeuQzjnW6sab78 8uk4eN0+A5xT/czJnym+pUQAM3E2RVrFSvIMemKFKCt7r06/oSftAyR5CQ7p6jU36pGW 4dfLxkkLBCPPc6TTXewJS7IKqdhVf1EkYI3uJhm3GwYL836OAEe2nIhcH8ZPVSlVGdpB lB3Q== 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=8YaQ8iKI54dCaW6u6I31MuR6mZ01H1YEV/Ji5Q6H3K4=; b=vWllrfgI1iDtmsBd7OuPxckA0t8H1nyYfbuXAacsqKviadc0djm04A6R1BIKRL//VD 2Oj5c8xFoUwXLThaZxljU84OEKVrxGWpLIKnvIuJk2MEZZ1BCDc19I4xG2LcNyIul8AR WLxPj6bZyYLsLWAOwP9fgtdVi577SXxxXf+GLfvwny0BqDj+jbH+GGIV+dgh4BpoaufQ 9jg4JtvvlT9SDLg33MdH6u2NSYzeORWD/hed0JAl375Cq1UUphxTAZ+tU9HvBmUCLlOZ vBoP2CerZAkgGSno099rpV1V1q5XbcYJqL+qbXl8GzyHbNmLdnqpEPCq9s2NiPTZ1SPZ SBsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=D9uqZ50w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd36si12890345ejc.457.2022.02.22.10.27.37; Tue, 22 Feb 2022 10:28:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=D9uqZ50w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233520AbiBVRL1 (ORCPT + 99 others); Tue, 22 Feb 2022 12:11:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbiBVRL0 (ORCPT ); Tue, 22 Feb 2022 12:11:26 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31C4BD108B; Tue, 22 Feb 2022 09:10:59 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 C89841EC02DD; Tue, 22 Feb 2022 18:10:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1645549853; 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=8YaQ8iKI54dCaW6u6I31MuR6mZ01H1YEV/Ji5Q6H3K4=; b=D9uqZ50wHD5MIYSMfdxhrhqo3177ttxb52pXnALYgQ5EUhSHFWx4a+2VF0af1kl01SNou7 4j1buSrPpsNycOlgqsYG4+hmBIR6wo+7I7gqvNaOY9MVhJBiRuWNiFGOGuVat4n17UJfy3 dMACtaC8KyIUWpQoE3TFGEQeRsQHonw= Date: Tue, 22 Feb 2022 18:10:57 +0100 From: Borislav Petkov To: Carlos Bilbao Cc: tony.luck@intel.com, yazen.ghannam@amd.com, Smita.KoralahalliChannabasappa@amd.com, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org Subject: Re: [PATCH] x86/mce: Simplify CPU vendor checks for AMD/Hygon and Intel/Zhaoxin Message-ID: References: <20220222155857.276286-1-carlos.bilbao@amd.com> <4e638a79-8b2e-291c-3b91-57677ffcc1fa@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4e638a79-8b2e-291c-3b91-57677ffcc1fa@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, On Tue, Feb 22, 2022 at 10:42:25AM -0600, Carlos Bilbao wrote: > the point is to simplify the code (as the patch stated). But it doesn't simplify the code - it makes it obscure. Also, your "simplification" breaks the moment you need to do something for the one vendor but *not* for the other. Because in such cases you'll have to do if (mce_flags.amd_compatible && m->cpuvendor != X86_VENDOR_HYGON) which makes me go, "huh what?!" So no, that's not better. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette