* [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
[not found] <20230411180302.2678736-1-terry.bowman@amd.com>
@ 2023-04-11 18:02 ` Terry Bowman
2023-04-12 11:04 ` Ard Biesheuvel
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Terry Bowman @ 2023-04-11 18:02 UTC (permalink / raw)
To: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, Jonathan.Cameron, linux-cxl
Cc: terry.bowman, rrichter, linux-kernel, bhelgaas, Ard Biesheuvel,
linux-efi
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.
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
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)
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
2023-04-11 18:02 ` [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules Terry Bowman
@ 2023-04-12 11:04 ` Ard Biesheuvel
2023-04-13 16:08 ` Jonathan Cameron
2023-04-17 23:08 ` Dan Williams
2 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2023-04-12 11:04 UTC (permalink / raw)
To: Terry Bowman
Cc: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, Jonathan.Cameron, linux-cxl, rrichter,
linux-kernel, bhelgaas, linux-efi
On Tue, 11 Apr 2023 at 20:03, Terry Bowman <terry.bowman@amd.com> 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.
>
> Signed-off-by: Terry Bowman <terry.bowman@amd.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: linux-efi@vger.kernel.org
Acked-by: Ard Biesheuvel <ardb@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)
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
2023-04-11 18:02 ` [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules Terry Bowman
2023-04-12 11:04 ` Ard Biesheuvel
@ 2023-04-13 16:08 ` Jonathan Cameron
2023-04-13 19:40 ` Terry Bowman
2023-04-17 23:08 ` Dan Williams
2 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2023-04-13 16:08 UTC (permalink / raw)
To: Terry Bowman
Cc: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, linux-cxl, rrichter, linux-kernel,
bhelgaas, Ard Biesheuvel, linux-efi
On Tue, 11 Apr 2023 13:02:58 -0500
Terry Bowman <terry.bowman@amd.com> 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?
Thanks,
Jonathan
>
> Signed-off-by: Terry Bowman <terry.bowman@amd.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> 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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
2023-04-13 16:08 ` Jonathan Cameron
@ 2023-04-13 19:40 ` Terry Bowman
2023-04-14 11:48 ` Jonathan Cameron
0 siblings, 1 reply; 8+ messages in thread
From: Terry Bowman @ 2023-04-13 19:40 UTC (permalink / raw)
To: Jonathan Cameron
Cc: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, linux-cxl, rrichter, linux-kernel,
bhelgaas, Ard Biesheuvel, linux-efi
Hi Jonathan,
On 4/13/23 11:08, Jonathan Cameron wrote:
> On Tue, 11 Apr 2023 13:02:58 -0500
> Terry Bowman <terry.bowman@amd.com> 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.
Regards,
Terry
> Thanks,
>
> Jonathan
>
>>
>> Signed-off-by: Terry Bowman <terry.bowman@amd.com>
>> Cc: Ard Biesheuvel <ardb@kernel.org>
>> 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)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
2023-04-13 19:40 ` Terry Bowman
@ 2023-04-14 11:48 ` Jonathan Cameron
2023-04-14 12:44 ` Robert Richter
[not found] ` <aba5d2ee-f451-145c-81c2-72595129483b@amd.com>
0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Cameron @ 2023-04-14 11:48 UTC (permalink / raw)
To: Terry Bowman
Cc: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, linux-cxl, rrichter, linux-kernel,
bhelgaas, Ard Biesheuvel, linux-efi
On Thu, 13 Apr 2023 14:40:10 -0500
Terry Bowman <Terry.Bowman@amd.com> wrote:
> Hi Jonathan,
>
> On 4/13/23 11:08, Jonathan Cameron wrote:
> > On Tue, 11 Apr 2023 13:02:58 -0500
> > Terry Bowman <terry.bowman@amd.com> 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 <terry.bowman@amd.com>
> >> Cc: Ard Biesheuvel <ardb@kernel.org>
> >> 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)
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
2023-04-14 11:48 ` Jonathan Cameron
@ 2023-04-14 12:44 ` Robert Richter
[not found] ` <aba5d2ee-f451-145c-81c2-72595129483b@amd.com>
1 sibling, 0 replies; 8+ messages in thread
From: Robert Richter @ 2023-04-14 12:44 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Terry Bowman, alison.schofield, vishal.l.verma, ira.weiny,
bwidawsk, dan.j.williams, dave.jiang, linux-cxl, linux-kernel,
bhelgaas, Ard Biesheuvel, linux-efi
On 14.04.23 12:48:05, Jonathan Cameron wrote:
> On Thu, 13 Apr 2023 14:40:10 -0500
> Terry Bowman <Terry.Bowman@amd.com> wrote:
>
> > Hi Jonathan,
> >
> > On 4/13/23 11:08, Jonathan Cameron wrote:
> > > On Tue, 11 Apr 2023 13:02:58 -0500
> > > Terry Bowman <terry.bowman@amd.com> 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!
No worries, it is used in some odd tracepoint macro magic included
with ras_event.h.
-Robert
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
[not found] ` <aba5d2ee-f451-145c-81c2-72595129483b@amd.com>
@ 2023-04-14 15:17 ` Terry Bowman
0 siblings, 0 replies; 8+ messages in thread
From: Terry Bowman @ 2023-04-14 15:17 UTC (permalink / raw)
To: Jonathan Cameron
Cc: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, linux-cxl, rrichter, linux-kernel,
bhelgaas, Ard Biesheuvel, linux-efi
On 4/14/23 08:24, Terry Bowman wrote:
>
>
> On 4/14/23 06:48, Jonathan Cameron wrote:
>> On Thu, 13 Apr 2023 14:40:10 -0500
>> Terry Bowman <Terry.Bowman@amd.com> wrote:
>>
>>> Hi Jonathan,
>>>
>>> On 4/13/23 11:08, Jonathan Cameron wrote:
>>>> On Tue, 11 Apr 2023 13:02:58 -0500
>>>> Terry Bowman <terry.bowman@amd.com> 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
>>
>
> I see. Without this patch, if include/ras/ras_event.h cper_mem_err_unpack()
>
> We use
>
>
Testing shows this patch is no longer needed. This patch was required for earlier
implementation calling the aer trace macros directly. I will remove this
patch in next patchset revision.
Regards,
Terry
>>>
>>> Regards,
>>> Terry
>>>
>>>> Thanks,
>>>>
>>>> Jonathan
>>>>
>>>>>
>>>>> Signed-off-by: Terry Bowman <terry.bowman@amd.com>
>>>>> Cc: Ard Biesheuvel <ardb@kernel.org>
>>>>> 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)
>>>>
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules
2023-04-11 18:02 ` [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules Terry Bowman
2023-04-12 11:04 ` Ard Biesheuvel
2023-04-13 16:08 ` Jonathan Cameron
@ 2023-04-17 23:08 ` Dan Williams
2 siblings, 0 replies; 8+ messages in thread
From: Dan Williams @ 2023-04-17 23:08 UTC (permalink / raw)
To: Terry Bowman, alison.schofield, vishal.l.verma, ira.weiny,
bwidawsk, dan.j.williams, dave.jiang, Jonathan.Cameron, linux-cxl
Cc: terry.bowman, rrichter, linux-kernel, bhelgaas, Ard Biesheuvel,
linux-efi
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.
>
> Signed-off-by: Terry Bowman <terry.bowman@amd.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> 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);
Looks ok to me. You could make it:
EXPORT_SYMBOL_NS_GPL(cper_mem_err_unpack, CXL)
...to make it clear that this is really only meant to be consumed by the
CXL subsystem. That was also the approach taken with the otherwise
internal-only insert_resource_expand_to_fit() symbol.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-04-17 23:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230411180302.2678736-1-terry.bowman@amd.com>
2023-04-11 18:02 ` [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules Terry Bowman
2023-04-12 11:04 ` Ard Biesheuvel
2023-04-13 16:08 ` Jonathan Cameron
2023-04-13 19:40 ` Terry Bowman
2023-04-14 11:48 ` Jonathan Cameron
2023-04-14 12:44 ` Robert Richter
[not found] ` <aba5d2ee-f451-145c-81c2-72595129483b@amd.com>
2023-04-14 15:17 ` Terry Bowman
2023-04-17 23:08 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox