Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1879776rwb; Fri, 12 Aug 2022 08:14:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR4gCAgr6IWIOno5hHRK05QdSlgFJeMkQcgyvO3OqvUyvswY/MIjQEIknMpFw251Lg47b1Eq X-Received: by 2002:a17:907:7395:b0:730:b636:2c89 with SMTP id er21-20020a170907739500b00730b6362c89mr3010493ejc.547.1660317268755; Fri, 12 Aug 2022 08:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660317268; cv=none; d=google.com; s=arc-20160816; b=SByHGq/laI2k0s1cTDLiMKQI5vnhfg5Ya7/QzyXSPe3UGoFLpx9Q/piJf9tvXlvxDW 5cYZM4O3M7ztZKAGuxvJhZj/NVC2qQj1ijSzZdpc6rdNyNO/Oa7fNod/uyzCI7mG4Qg9 KEfZcgbfH7DmZtnTVGzcNnxbeX+v+j3jvQ7S1tafQT6BsHtf/fLu25NMaKUdSRIUVtD6 g9wPehxhDsEQG0lYoRuC31RR9JKmwHHyFrj12v0d5GVb5BuOLLUyrGn6DKVrreAWjcz0 0IZTqCnOLNYjnG/yOp28rS0shyZSUu9tw9gSbpHYtoTwFbEpjUas31RvPVOrlSSFnbCj hfpg== 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=rE25dEst67ND0DTXuiElw5hjh014xb/IHS7uqD6DMbU=; b=VMoi7CcmItl3/FbuoDmtwhetcyHvWz/eU9Brdm0hw+ZGsshd0pLhc+KpXq2kIU2TmH SJr0tNCJMevYw6KOCO8NodddZibsYGFdriT+K2KqKlRtrcRUP8yglAYDaZe1yQ2voKvi +GYrLZoNl7jbjSSWs9Z6DwnurEyK0r4TNDgNaOj7Wv74JoTEGbHUMRG+1P98e0wSSZ5y plNnlNZNz93QtOodvZ8taN9+X9zR9p26UgLOTm5lLBrDKiTKX/jGKpCu1+kQzA6NxB3E c5eory+wEDglA3UkG4iZOSnm54B7aKomPZJwFSb18b5dm831m6W+lK6FQ+3a3hrILCMX VSgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UhaR64dV; 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 g1-20020a056402424100b0043cc0f63162si2543557edb.559.2022.08.12.08.14.03; Fri, 12 Aug 2022 08:14:28 -0700 (PDT) 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=UhaR64dV; 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 S234273AbiHLOqR (ORCPT + 99 others); Fri, 12 Aug 2022 10:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbiHLOqQ (ORCPT ); Fri, 12 Aug 2022 10:46:16 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 428E998CAB; Fri, 12 Aug 2022 07:46:15 -0700 (PDT) Received: from zn.tnic (p200300ea971b98b3329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:98b3:329c:23ff:fea6:a903]) (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 C8CD61EC054C; Fri, 12 Aug 2022 16:46:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1660315569; 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=rE25dEst67ND0DTXuiElw5hjh014xb/IHS7uqD6DMbU=; b=UhaR64dVHe/vueO54aqMqv+0IcGVJhTwv6YEzhrFmUAP90R9of/rC+AqbJ3h6rspeF5fcu W2ubYggayFzIBiRjB/9BimTnQ5sxbuu9qpLeoDqz0bNdJiDOH6kbKO0EbT6HGckDRP+7aM t5rCpNrBXFq47MhnslddMr4SJmVgQpQ= Date: Fri, 12 Aug 2022 16:46:05 +0200 From: Borislav Petkov To: Jia He Cc: Ard Biesheuvel , Len Brown , James Morse , Tony Luck , Mauro Carvalho Chehab , Robert Richter , Robert Moore , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, devel@acpica.org, "Rafael J . Wysocki" , Shuai Xue , Jarkko Sakkinen , linux-efi@vger.kernel.org, nd@arm.com, toshi.kani@hpe.com, stable@kernel.org Subject: Re: [PATCH 2/2] EDAC/ghes: Modularize ghes_edac driver to remove the dependency on ghes Message-ID: References: <20220811091713.10427-1-justin.he@arm.com> <20220811091713.10427-3-justin.he@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220811091713.10427-3-justin.he@arm.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 On Thu, Aug 11, 2022 at 09:17:13AM +0000, Jia He wrote: > diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c > index d91ad378c00d..ed6519f3d45b 100644 > --- a/drivers/acpi/apei/ghes.c > +++ b/drivers/acpi/apei/ghes.c > @@ -94,6 +94,8 @@ > #define FIX_APEI_GHES_SDEI_CRITICAL __end_of_fixed_addresses > #endif > > +ATOMIC_NOTIFIER_HEAD(ghes_report_chain); static. You need function wrappers which call the notifier from the module. Also, why atomic? x86_mce_decoder_chain is a blocking one. Also, the whole notifier adding thing needs to be a separate patch. > @@ -1497,3 +1504,37 @@ void __init acpi_ghes_init(void) > else > pr_info(GHES_PFX "Failed to enable APEI firmware first mode.\n"); > } > + > +/* > + * Known x86 systems that prefer GHES error reporting: > + */ > +static struct acpi_platform_list plat_list[] = { > + {"HPE ", "Server ", 0, ACPI_SIG_FADT, all_versions}, > + { } /* End */ > +}; > + > +struct list_head *ghes_get_devices(bool force) > +{ > + int idx = -1; > + > + if (IS_ENABLED(CONFIG_X86)) { > + idx = acpi_match_platform_list(plat_list); > + if (idx < 0 && !force) > + return NULL; > + } > + > + return &ghes_devs; > +} > +EXPORT_SYMBOL_GPL(ghes_get_devices); And yes, as Toshi points out, the other EDAC drivers - sb_edac, skx_edac and amd64_edac - should call this function in their init functions so that it can get selected which driver to load on HPE server platforms. Also in a separate patch pls. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette