From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80653C3F6B0 for ; Tue, 9 Aug 2022 17:15:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235645AbiHIRPv (ORCPT ); Tue, 9 Aug 2022 13:15:51 -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: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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