Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6193278rwb; Tue, 9 Aug 2022 10:37:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR4vukIDDnjOKbV1askuNm8qILeGWfAXBKXkN8SruNc/Ph2xGpE8RBjxSWrrQK2vuWps0q/o X-Received: by 2002:a17:903:124e:b0:16b:e975:232f with SMTP id u14-20020a170903124e00b0016be975232fmr23424003plh.165.1660066675455; Tue, 09 Aug 2022 10:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660066675; cv=none; d=google.com; s=arc-20160816; b=fGXJrOU6xlDQ6IbweJYExGJfUX8Vs581NtxipMnb2klEw8KfXRVbeYtvIVOnC4/LsC zjTqba8oEAH0JKtfwxvEhER76DQUIjcvG4SwXxcDhuzkX1QuhxNt5k6IV1DvNo/Jc57b 3xnOvVv8ydks05v5wNXU3t4x6KNFu+7InNoeCCiSUgA7JLk/61xmYPaQlzbIAKhXgEk5 YlgNB48EiPrRPY6ZZUYEtkk2NCP+1HkXZO2AojboK1wiv0JpwKqSh8uoYaYv76i3av22 dCuKkcxRzQ9+B8pDoi3Lzk5KKC35A+QH22E6Hqtoa9B7aglppS2sNNNbFaOLWm+proT/ PR5g== 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=qYCIERlVU5uYY2QgYl+2fvUl3A85yoSNYStCUb+X3TA=; b=zY+YFcNYnP1GTgPza10TEc6OcfZkc9Ge7y0FDY4g1PVoT5/X5pVW3uydVy9zXpk//R N4kC/1clPftuu8ECNgKhG7V8IRGah2utLdUFV+Dwom9hWj/AR/afWHoz9c6YVsSOLdTh 9NXVdAAD8a7IuYmU9swrbs2iqC8ghcEm/yhIebq1NMuLS65r8tHbhfXGB0pvQJdxPlbm cYxKr9YisQNQEVRaRZoRTwPrPB1F0ydkTWa+yve6N2i1N60HPI2kR3CeQ2+Whlp8jODU pwSuZjShfGx1rpEGtr8WkAfXBwSG3ulcWzIgnxRzEaX2DzWErXcdTe9qyCTRVh4GaOPV 2Z2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=IT6BilTW; 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 v135-20020a63618d000000b0041b8d7f55e6si116768pgb.727.2022.08.09.10.37.30; Tue, 09 Aug 2022 10:37:55 -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=IT6BilTW; 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 S238268AbiHIRPx (ORCPT + 99 others); Tue, 9 Aug 2022 13:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232983AbiHIRPu (ORCPT ); Tue, 9 Aug 2022 13:15:50 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75B0825FA; Tue, 9 Aug 2022 10:15:49 -0700 (PDT) Received: from zn.tnic (p200300ea971b9800329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:9800: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 1295A1EC0554; Tue, 9 Aug 2022 19:15:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1660065344; 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=qYCIERlVU5uYY2QgYl+2fvUl3A85yoSNYStCUb+X3TA=; b=IT6BilTWrRbJf9BlHfmtWVItWzJSO6RYSs1B76KNZmFbc0ychnLMX4aV6Sc155uveh2aCF UqSA8Fq/UQHrVy7Q1hlBVAJ82OYZEio43OH4iRqvXsjsBldP0rh2s+u0xCFoqLVuv2t0eA wBoBeSxUWiWQ8ygl7xfOXVmLnsfJNVM= Date: Tue, 9 Aug 2022 19:15:43 +0200 From: Borislav Petkov To: Justin He Cc: "Kani, Toshi" , "Rafael J. Wysocki" , Len Brown , James Morse , Tony Luck , Mauro Carvalho Chehab , Robert Richter , Shuai Xue , Jarkko Sakkinen , ACPI Devel Maling List , Linux Kernel Mailing List , "open list:EDAC-CORE" Subject: Re: =?utf-8?B?5Zue5aSNOiBbUEFUQ0hdIEFDUEk=?= =?utf-8?Q?=3A?= APEI: move edac_init ahead of ghes platform drv register Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 Tue, Aug 09, 2022 at 04:51:45PM +0000, Justin He wrote: > Let me summarize it before sending v2 (maybe tomorrow): > 1. implement a ghes_edac_driver_is_preferred() to replace the old ghes_edac_register() > and move it to ghes.c together with plat_list No, not replace. In ghes.c: - add ghes_edac_driver_is_preferred() - remove ghes_edac_register() and _unregister() calls from there. Make them proper module init/exit functions. - Make ghes_edac.c a proper module - i.e., get rid of this thing: config EDAC_GHES bool "Output ACPI APEI/GHES BIOS detected errors via EDAC" depends on ACPI_APEI_GHES && (EDAC=y) ^^^^^^^^ > 2. save the ghes and dev to a global structure and pass it to the new module_init Not at all... > 3.move the remain logic of old ghes_edac_register() to a new XX_init() which is under the > module_init path. > 4. introduce a stub ghes_edac_driver_is_preferred() for sb_edac, skx_edac and amd64_edac > to check. > 5. add the check condition in the XXX_init of sb_edac, skx_edac and amd64_edac > > Please let me know if I missed anything above. Yes, I think you do. Lemme write something and you can finish it/test it. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette