From: Sasha Levin <sashal@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Jianmin Lv <lvjianmin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
bhelgaas@google.com, rafael@kernel.org,
linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.0 11/16] ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity
Date: Sun, 18 Dec 2022 06:26:10 -0500 [thread overview]
Message-ID: <Y5740vP0CfJ2u+0n@sashalap> (raw)
In-Reply-To: <86pmchq4y9.wl-maz@kernel.org>
On Sat, Dec 17, 2022 at 06:07:42PM +0000, Marc Zyngier wrote:
>On Sat, 17 Dec 2022 15:28:14 +0000,
>Sasha Levin <sashal@kernel.org> wrote:
>>
>> From: Jianmin Lv <lvjianmin@loongson.cn>
>>
>> [ Upstream commit d0c50cc4b957b2cf6e43cec4998d212b5abe9220 ]
>>
>> On LoongArch based systems, the PCI devices (e.g. SATA controllers and
>> PCI-to-PCI bridge controllers) in Loongson chipsets output high-level
>> interrupt signal to the interrupt controller they are connected (see
>> Loongson 7A1000 Bridge User Manual v2.00, sec 5.3, "For the bridge chip,
>> AC97 DMA interrupts are edge triggered, gpio interrupts can be configured
>> to be level triggered or edge triggered as needed, and the rest of the
>> interrupts are level triggered and active high."), while the IRQs are
>> active low from the perspective of PCI (see Conventional PCI spec r3.0,
>> sec 2.2.6, "Interrupts on PCI are optional and defined as level sensitive,
>> asserted low."), which means that the interrupt output of PCI devices plugged
>> into PCI-to-PCI bridges of Loongson chipset will be also converted to high-level.
>> So high level triggered type is required to be passed to acpi_register_gsi()
>> when creating mappings for PCI devices.
>>
>> Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
>> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
>> Signed-off-by: Marc Zyngier <maz@kernel.org>
>> Link: https://lore.kernel.org/r/20221022075955.11726-2-lvjianmin@loongson.cn
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> drivers/acpi/pci_irq.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
>> index 08e15774fb9f..ff30ceca2203 100644
>> --- a/drivers/acpi/pci_irq.c
>> +++ b/drivers/acpi/pci_irq.c
>> @@ -387,13 +387,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
>> u8 pin;
>> int triggering = ACPI_LEVEL_SENSITIVE;
>> /*
>> - * On ARM systems with the GIC interrupt model, level interrupts
>> + * On ARM systems with the GIC interrupt model, or LoongArch
>> + * systems with the LPIC interrupt model, level interrupts
>> * are always polarity high by specification; PCI legacy
>> * IRQs lines are inverted before reaching the interrupt
>> * controller and must therefore be considered active high
>> * as default.
>> */
>> - int polarity = acpi_irq_model == ACPI_IRQ_MODEL_GIC ?
>> + int polarity = acpi_irq_model == ACPI_IRQ_MODEL_GIC ||
>> + acpi_irq_model == ACPI_IRQ_MODEL_LPIC ?
>> ACPI_ACTIVE_HIGH : ACPI_ACTIVE_LOW;
>> char *link = NULL;
>> char link_desc[16];
>
>This is pointless on its own too, as it requires plenty of other
>changes, none of which are stable candidates. Please drop this as well
>as the v6.1 backport.
Ack, will do. Thanks!
--
Thanks,
Sasha
next prev parent reply other threads:[~2022-12-18 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221217152821.98618-1-sashal@kernel.org>
2022-12-17 15:28 ` [PATCH AUTOSEL 6.0 05/16] ACPI: processor: idle: Check acpi_fetch_acpi_dev() return value Sasha Levin
2022-12-17 15:28 ` [PATCH AUTOSEL 6.0 06/16] ACPI: EC: Add quirk for the HP Pavilion Gaming 15-cx0041ur Sasha Levin
2022-12-17 15:28 ` [PATCH AUTOSEL 6.0 07/16] ACPICA: Fix error code path in acpi_ds_call_control_method() Sasha Levin
2022-12-17 15:28 ` [PATCH AUTOSEL 6.0 11/16] ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity Sasha Levin
2022-12-17 18:07 ` Marc Zyngier
2022-12-18 11:26 ` Sasha Levin [this message]
2022-12-17 15:28 ` [PATCH AUTOSEL 6.0 14/16] ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Tab 3 Pro (YT3-X90F) Sasha Levin
2022-12-17 15:28 ` [PATCH AUTOSEL 6.0 15/16] ACPI: x86: Add skip i2c clients quirk for Medion Lifetab S10346 Sasha Levin
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=Y5740vP0CfJ2u+0n@sashalap \
--to=sashal@kernel.org \
--cc=bhelgaas@google.com \
--cc=chenhuacai@loongson.cn \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lvjianmin@loongson.cn \
--cc=maz@kernel.org \
--cc=rafael@kernel.org \
--cc=stable@vger.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