Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp402778rwe; Fri, 14 Apr 2023 04:50:59 -0700 (PDT) X-Google-Smtp-Source: AKy350ZQSAloBkj37eR34RNqOY7hS22WXenLb8Gqh0FkcKLmiJwwWWGSqiz0GRlxigY9a3GMhtRe X-Received: by 2002:a05:6a20:121f:b0:db:1b41:704 with SMTP id v31-20020a056a20121f00b000db1b410704mr5302650pzf.16.1681473058735; Fri, 14 Apr 2023 04:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681473058; cv=none; d=google.com; s=arc-20160816; b=kSsNYE+7HXPboWu++S1s/pjrH3eD1fcxVhOs7vImM4c4mZvthqiM70QiI5IYoy83tI q1dgiY7E9mGpIQRZZ0zBdlHMCu6AZxIEoJp0OI6vvbRdBd9f1+7sflVNAd6O1X+R6365 ZYZKxWCEtfLqrSfFYJyZnjdlPJVb0FKavpIphO/v63cT+6du0xdUfSuXGQagnSoplgr/ NI91hJub9kJD2UjLB0SiYe1E+GxROkkxAE/NA1d5r7LOGIHrXeuJvLNzrtSrx/2dCAEE cuztjP3Y0T8kFLuQBZNmKQNZT2CyfNP46Sxi2v2KVeYoyI36MYgb4eaXJJ0ipE7gehwZ 6WBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=CVM7hlFMaSyVgI7fgGX1Z7qSWHdUQf1Iv+8WxjaEFng=; b=t31TnD9cE/9Gk+WsOFI4k8kjHxBl9UzkCLgUEeujfA4aL8tf8carABfdcugGRejfKs 5FhIdvVnx0ZSqfTY0dM6Oe/nf/FZnNIWq7C1F2C/8FxILlSUwQ4WwMNc8IcPIRPLDXXs 6jKvjtrVKuT6h9wGcjsJkDz+K8xyhoPYelg7k/QehVdIltf4h2qNmk5BQoLnJfMVe64N 03SOdKZs9un0WUO1OywPEvl7scvSd8vJJVifrlwcDoXmmzMBb1tVdTkjxL2cquAkB1H0 CSAvDmNXPgaAT2u+9B7PhJE9nCdB2Hiq8NZF1zFuedv8VsWbZ2AYdb4Hx4MY5fgp9IuK 0pXA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 194-20020a6305cb000000b00509d00f18efsi4349688pgf.112.2023.04.14.04.50.45; Fri, 14 Apr 2023 04:50:58 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbjDNLsO (ORCPT + 99 others); Fri, 14 Apr 2023 07:48:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjDNLsM (ORCPT ); Fri, 14 Apr 2023 07:48:12 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B0483ED; Fri, 14 Apr 2023 04:48:09 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PyZQB6156z6JCL5; Fri, 14 Apr 2023 19:45:38 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 14 Apr 2023 12:48:07 +0100 Date: Fri, 14 Apr 2023 12:48:05 +0100 From: Jonathan Cameron To: Terry Bowman CC: , , , , , , , , , , Ard Biesheuvel , Subject: Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules Message-ID: <20230414124805.00000479@Huawei.com> In-Reply-To: <9d66afdb-40bd-4254-547e-05f6481dd550@amd.com> References: <20230411180302.2678736-1-terry.bowman@amd.com> <20230411180302.2678736-3-terry.bowman@amd.com> <20230413170816.0000333b@Huawei.com> <9d66afdb-40bd-4254-547e-05f6481dd550@amd.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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, 13 Apr 2023 14:40:10 -0500 Terry Bowman wrote: > Hi Jonathan, > > On 4/13/23 11:08, Jonathan Cameron wrote: > > On Tue, 11 Apr 2023 13:02:58 -0500 > > Terry Bowman wrote: > > > >> The CXL driver plans to use cper_print_aer() for restricted CXL host (RCH) > >> logging. This is not currently possible if CXL is built as a loadable > >> module because cper_print_aer() depends on cper_mem_err_unpack() which > >> is not exported. > >> > >> Export cper_mem_err_unpack() to enable cper_print_aer() usage in > >> CXL and other loadable modules. > > > > No problem with the export, but I'm struggling to see the path that needs it. > > Could you give a little more detail, perhaps a call path? > > > > The cper_print_aer() is used to log RCH dport AER errors. This is needed > because the RCH dport AER errors are not handled directly by the AER port > driver. I'll add these details to the patch. Ah. I wasn't particularly clear. cper_print_aer() is fine, but oddly I'm not seeing where that results in a call to cper_mem_err_unpack() More than possible my grep skills are failing me! Jonathan > > Regards, > Terry > > > Thanks, > > > > Jonathan > > > >> > >> Signed-off-by: Terry Bowman > >> Cc: Ard Biesheuvel > >> Cc: linux-efi@vger.kernel.org > >> --- > >> drivers/firmware/efi/cper.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c > >> index 35c37f667781..ff15e12160ae 100644 > >> --- a/drivers/firmware/efi/cper.c > >> +++ b/drivers/firmware/efi/cper.c > >> @@ -350,6 +350,7 @@ const char *cper_mem_err_unpack(struct trace_seq *p, > >> > >> return ret; > >> } > >> +EXPORT_SYMBOL_GPL(cper_mem_err_unpack); > >> > >> static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, > >> int len) > >