diff mbox series

[1/3] mailbox: pcc: rename platform interrupt bit macro name

Message ID 20221110015034.7943-2-lihuisong@huawei.com
State New
Headers show
Series ACPI: PCC: optimize pcc codes and fix one bug | expand

Commit Message

lihuisong (C) Nov. 10, 2022, 1:50 a.m. UTC
Currently, the name of platform interrupt bit macro, ACPI_PCCT_DOORBELL,
is not very appropriate. The doorbell is generally considered as an action
when send mailbox data. Actually, the macro value comes from Platform
Interrupt in Platform Communications Channel Global Flags. If the bit is
'1', it means that the platform is capable of generating an interrupt to
indicate completion of a command.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/mailbox/pcc.c | 2 +-
 include/acpi/actbl2.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Sudeep Holla Nov. 10, 2022, 10:25 a.m. UTC | #1
On Thu, Nov 10, 2022 at 09:50:32AM +0800, Huisong Li wrote:
> Currently, the name of platform interrupt bit macro, ACPI_PCCT_DOORBELL,
> is not very appropriate. The doorbell is generally considered as an action
> when send mailbox data. Actually, the macro value comes from Platform
> Interrupt in Platform Communications Channel Global Flags. If the bit is
> '1', it means that the platform is capable of generating an interrupt to
> indicate completion of a command.
>

This is touching ACPICA header file, so it must be submitted to ACPICA
separately following the guidelines in the github and imported into the
kernel.

However, I don't see any point in this change. Yes the language "doorbell"
is not used in this particular context in the spec, but it is implicit from
other parts. I am not opposing the change though if Rafael is OK and ACPICA
project accepts it.
lihuisong (C) Nov. 11, 2022, 1:10 a.m. UTC | #2
在 2022/11/11 3:29, Rafael J. Wysocki 写道:
> On Thu, Nov 10, 2022 at 1:17 PM lihuisong (C) <lihuisong@huawei.com> wrote:
>>
>> 在 2022/11/10 18:25, Sudeep Holla 写道:
>>> On Thu, Nov 10, 2022 at 09:50:32AM +0800, Huisong Li wrote:
>>>> Currently, the name of platform interrupt bit macro, ACPI_PCCT_DOORBELL,
>>>> is not very appropriate. The doorbell is generally considered as an action
>>>> when send mailbox data. Actually, the macro value comes from Platform
>>>> Interrupt in Platform Communications Channel Global Flags. If the bit is
>>>> '1', it means that the platform is capable of generating an interrupt to
>>>> indicate completion of a command.
>>>>
>>> This is touching ACPICA header file, so it must be submitted to ACPICA
>>> separately following the guidelines in the github and imported into the
>>> kernel.
>> Got it, thanks.
>>> However, I don't see any point in this change. Yes the language "doorbell"
>>> is not used in this particular context in the spec, but it is implicit from
>>> other parts. I am not opposing the change though if Rafael is OK and ACPICA
>>> project accepts it.
>> @Rafael, what do you think?
> Well, I wouldn't send a patch to make this change myself, but if you
> really care about it, please submit an upstream ACPICA pull request in
> the first place and we'll see.
All right. Indeed, it doesn't matter. Ignore it.
> .
diff mbox series

Patch

diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 3c2bc0ca454c..7cee37dd3b73 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -665,7 +665,7 @@  static int pcc_mbox_probe(struct platform_device *pdev)
 		(unsigned long) pcct_tbl + sizeof(struct acpi_table_pcct));
 
 	acpi_pcct_tbl = (struct acpi_table_pcct *) pcct_tbl;
-	if (acpi_pcct_tbl->flags & ACPI_PCCT_DOORBELL)
+	if (acpi_pcct_tbl->flags & BIT(ACPI_PCCT_FLAGS_PLAT_INTERRUPT_B))
 		pcc_mbox_ctrl->txdone_irq = true;
 
 	for (i = 0; i < count; i++) {
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 655102bc6d14..3840507fdc79 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -1810,7 +1810,7 @@  struct acpi_table_pcct {
 
 /* Values for Flags field above */
 
-#define ACPI_PCCT_DOORBELL              1
+#define ACPI_PCCT_FLAGS_PLAT_INTERRUPT_B              1
 
 /* Values for subtable type in struct acpi_subtable_header */