lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cb6b0b57-c5b7-46c4-8909-e6955ceee401@amperemail.onmicrosoft.com>
Date: Wed, 4 Feb 2026 16:40:05 -0500
From: Adam Young <admiyo@...eremail.onmicrosoft.com>
To: Sudeep Holla <sudeep.holla@...nel.org>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
 Jassi Brar <jassisinghbrar@...il.com>,
 Adam Young <admiyo@...amperecomputing.com>,
 Robbie King <robbiek@...ghtlabs.com>, Huisong Li <lihuisong@...wei.com>,
 Cristian Marussi <cristian.marussi@....com>
Subject: Re: [PATCH 0/6] mailbox: pcc: Refactor and improve initialisation and
 interrupt handling

I was just looking at it.  I think reposting might cause too much churn, 
when the  crux of the matter is what to do with these three functions I 
added:

extern struct pcc_mbox_chan *
pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id);
extern void pcc_mbox_free_channel(struct pcc_mbox_chan *chan);
extern
int pcc_mbox_write_to_buffer(struct pcc_mbox_chan *pchan, int len, void 
*data);
extern
int pcc_mbox_query_bytes_available(struct pcc_mbox_chan *pchan);
extern
int pcc_mbox_read_from_buffer(struct pcc_mbox_chan *pchan, int len,
                               void *data);

In my last patch I added them as EXPORT_SYMBOL_GPL.  You mentioned you 
wanted them as inline.

We can do that, but it does mean further exposing the ACPI header file.  
THe simplest is  pcc_mbox_query_bytes_available which I have posted 
below.  As you can see, it needs the struct 
acpi_pcct_ext_pcc_shared_memory  which comes from 
include/acpi/actbl2.h.  If you are OK with adding that to 
include/acpi/pcc.h  We can inline the functions in there.

These three functions are requied as a result of the direct access to 
the shared memory buffer.


int pcc_mbox_query_bytes_available(struct pcc_mbox_chan *pchan)
{
         struct acpi_pcct_ext_pcc_shared_memory pcc_header;
         struct pcc_chan_info *pinfo = pchan->mchan->con_priv;
         int data_len;
         u64 val;

         pcc_chan_reg_read(&pinfo->cmd_complete, &val);
         if (val) {
                 pr_info("%s Buffer not enabled for reading", __func__);
                 return -1;
         }
         memcpy_fromio(&pcc_header, pchan->shmem,
                       sizeof(pcc_header));
         data_len = pcc_header.length - sizeof(u32) + sizeof(pcc_header);
         return data_len;
}




On 1/27/26 04:29, Sudeep Holla wrote:
> On Mon, Jan 26, 2026 at 12:07:26PM -0500, Adam Young wrote:
>>
>> On 1/12/26 11:55, Sudeep Holla wrote:
>>> On Thu, Nov 27, 2025 at 02:40:56PM +0000, Sudeep Holla wrote:
>>>> Hi Jassi,
>>>>
>>>> On Thu, Oct 16, 2025 at 08:08:14PM +0100, Sudeep Holla wrote:
>>>>> This series refines and stabilizes the PCC mailbox driver to improve
>>>>> initialisation order, interrupt handling, and completion signaling.
>>>>>
>>>> Are you happy to pull these patches directly from the list or do you
>>>> prefer me to send you pull request or do you want me to direct this via
>>>> ACPI/Rafael's tree. Please advice.
>>>>
>>> Hi Jassi,
>>>
>>> Sorry for the nag. I did see these patches in -next as well as your
>>> v6.19 merge window pull request which didn't make it to Linus tree.
>>> However I don't see it -next any longer. Please advice if you want
>>> anything from my side so that this can be merged for v6.20/v7.0
>>>
>> I thought you had an approach you wanted to implement for the functions that
>> provided access to the Mailbox internals: you wanted to do them inline but
>> hadn't gotten to them yet.  Is that still the case?  I will resubmit mine as
>> is with -next if that is acceptable.
>>
> Honestly, it has been a while and I have lost the context. Please post what
> you have or thinking of on top of linux-next or jassi's -next and we can start
> the discussion fresh.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ