From: Hans de Goede <hdegoede@redhat.com>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Arnd Bergmann" <arnd@kernel.org>,
"Suma Hegde" <suma.hegde@amd.com>
Cc: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Carlos Bilbao <carlos.bilbao.osdev@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Randy Dunlap <rdunlap@infradead.org>,
Bjorn Helgaas <bhelgaas@google.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86/amd/hsmp: mark hsmp_msg_desc_table[] as maybe_unused
Date: Wed, 30 Oct 2024 18:17:02 +0100 [thread overview]
Message-ID: <046687d8-1e2d-435b-adcb-26897bfd29f7@redhat.com> (raw)
In-Reply-To: <a3b3aa23-3238-4117-b931-7194fc1ccc34@app.fastmail.com>
Hi,
On 30-Oct-24 3:19 PM, Arnd Bergmann wrote:
> On Wed, Oct 30, 2024, at 14:16, Hans de Goede wrote:
>> On 29-Oct-24 1:55 PM, Ilpo Järvinen wrote:
>>> On Mon, 28 Oct 2024, Arnd Bergmann wrote:
>>>
>>> It seems that the main goal why it was put into UAPI was "to give the user
>>> some reference about proper num_args and response_size for each message":
>>>
>>> https://lore.kernel.org/all/CAPhsuW5V0BJT+YSwv1U=hRG0k9zBWXeRd=E1n4U5hvcnwEV3mQ@mail.gmail.com/
>>>
>>> Are we actually expecting userspace to benefit from this in C form?
>>> Suma? Hans?
>>
>> I can see how having this available in the uapi header as documentation
>> of sorts is somewhat useful.
>>
>> OTOH I do agree that this array should probably not be used by userspace.
>>
>> And there is only 1 way to find out if it is actually used (which I do not
>> expect) and that is to just drop it and find out (and to be willing to
>> revert the change if it breaks things).
>>
>> So we can either move the array in its entirety to the c-code consuming it,
>> which I think would be best; or we can go with Arnd's patch + add
>>
>> #ifdef __KERNEL__
>>
>> around the array so that it is there for people reading the header, but
>> it is no longer exposed as uapi.
>>
>
> I don't think that would work, because the 'make headers_install'
> step just removes the contents of #ifdef __KERNEL__, in this case
> you just end up with a uapi header that doesn't have the array.
Ah I did not realize that.
Ok so lets just move the definition to the .c file which actually
uses the array and then add a comment like this:
/*
* See hsmp_msg_desc_table[] in:
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/amd/hsmp.c
*
* for some information on number of input- and output arguments
* for the various functions.
*
* Please find the supported list of messages and message definition
* in the HSMP chapter of respective family/model PPR.
*/
Note please replace hsmp.c with the .c file to which the array
is actually moving ...
Regards,
Hans
prev parent reply other threads:[~2024-10-30 17:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 16:35 Arnd Bergmann
2024-10-29 12:55 ` Ilpo Järvinen
2024-10-30 14:16 ` Hans de Goede
2024-10-30 14:19 ` Arnd Bergmann
2024-10-30 17:17 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=046687d8-1e2d-435b-adcb-26897bfd29f7@redhat.com \
--to=hdegoede@redhat.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=carlos.bilbao.osdev@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=naveenkrishna.chatradhi@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=suma.hegde@amd.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®