diff options
author | Huisong Li <lihuisong@huawei.com> | 2023-08-01 14:38:27 +0800 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-09-11 10:31:17 +0100 |
commit | 3db174e478cb0bb34888c20a531608b70aec9c1f (patch) | |
tree | ece9e66a9d121f20f2cd94ad9a5b2ad1d3d1ffc4 /include/acpi/pcc.h | |
parent | 60c40b06fa68694dd08a1a0038ea8b9de3f3b1ca (diff) | |
download | lwn-3db174e478cb0bb34888c20a531608b70aec9c1f.tar.gz lwn-3db174e478cb0bb34888c20a531608b70aec9c1f.zip |
mailbox: pcc: Support shared interrupt for multiple subspaces
If the platform acknowledge interrupt is level triggered, then it can
be shared by multiple subspaces provided each one has a unique platform
interrupt ack preserve and ack set masks.
If it can be shared, then we can request the irq with IRQF_SHARED and
IRQF_ONESHOT flags. The first one indicating it can be shared and the
latter one to keep the interrupt disabled until the hardirq handler
finished.
Further, since there is no way to detect if the interrupt is for a given
channel as the interrupt ack preserve and ack set masks are for clearing
the interrupt and not for reading the status(in case Irq Ack register
may be write-only on some platforms), we need a way to identify if the
given channel is in use and expecting the interrupt.
PCC type0, type1 and type5 do not support shared level triggered interrupt.
The methods of determining whether a given channel for remaining types
should respond to an interrupt are as follows:
- type2: Whether the interrupt belongs to a given channel is only
determined by the status field in Generic Communications Channel
Shared Memory Region, which is done in rx_callback of PCC client.
- type3: This channel checks chan_in_use flag first and then checks the
command complete bit(value '1' indicates that the command has
been completed).
- type4: Platform ensure that the default value of the command complete
bit corresponding to the type4 channel is '1'. This command
complete bit is '0' when receive a platform notification.
The new field, 'chan_in_use' is used by the type only support the
communication from OSPM to Platform (like type3) and should be completely
ignored by other types so as to avoid too many type unnecessary checks in
IRQ handler.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/20230801063827.25336-3-lihuisong@huawei.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/acpi/pcc.h')
0 files changed, 0 insertions, 0 deletions