[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230302135201.c2qbvtx6k5mgnobv@bogus>
Date: Thu, 2 Mar 2023 13:52:01 +0000
From: Sudeep Holla <sudeep.holla@....com>
To: "lihuisong (C)" <lihuisong@...wei.com>
Cc: robbiek@...ghtlabs.com, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, rafael@...nel.org,
Sudeep Holla <sudeep.holla@....com>,
rafael.j.wysocki@...el.com, wanghuiqiang@...wei.com,
zhangzekun11@...wei.com, wangxiongfeng2@...wei.com,
tanxiaofei@...wei.com, guohanjun@...wei.com, xiexiuqi@...wei.com,
wangkefeng.wang@...wei.com, huangdaode@...wei.com
Subject: Re: [PATCH 1/2] mailbox: pcc: Add processing platform notification
for slave subspaces
On Thu, Mar 02, 2023 at 09:57:35AM +0800, lihuisong (C) wrote:
>
> 在 2023/3/1 21:24, Sudeep Holla 写道:
[...]
> >
> > +static bool pcc_mbox_cmd_complete_check(struct pcc_chan_info *pchan)
> > +{
> > + u64 val;
> > + int ret;
> > +
> > + ret = pcc_chan_reg_read(&pchan->cmd_complete, &val);
> > + if (ret)
> > + return false;
> > +
>
> we indeed already check if cmd_complete register is exist.
> IMO, it can simply the code logic and reduce the risk of problems if we
> return true here for the type without this register.
> what do you think?
>
IIUC, your concern is about returning true for type 4 when the register
doesn't exist, right ?
I am saying it won't happen as we bail out if there is no GAS register
from pcc_chan_reg_init(). Or am I missing something here ?
> > + val &= pchan->cmd_complete.status_mask;
> > +
> > + /*
> > + * If this is PCC slave subspace channel, then the command complete
> > + * bit 0 indicates that Platform is sending a notification and OSPM
> > + * needs to respond this interrupt to process this command.
> > + */
> > + if (pchan->type == ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE)
> > + return !val;
> > + else
> > + return !!val;
> This else branch is not applicable to type 3. type 3 will cannot respond
> interrupt.
Sorry I don't understand what you mean by that.
--
Regards,
Sudeep
Powered by blists - more mailing lists