summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAngela Czubak <acz@semihalf.com>2021-04-08 12:37:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-12 08:39:37 +0200
commit840872c2aed21e82579292c09ccef8f5e34b0eba (patch)
tree53947ae0ff4b118b67b5a33b894f9f55f39aedd1 /include
parentf938233fe9a668268182aad387ddb39cbcfa4940 (diff)
downloadlinux-stable-840872c2aed21e82579292c09ccef8f5e34b0eba.tar.gz
linux-stable-840872c2aed21e82579292c09ccef8f5e34b0eba.tar.bz2
linux-stable-840872c2aed21e82579292c09ccef8f5e34b0eba.zip
resource: Prevent irqresource_disabled() from erasing flags
[ Upstream commit d08a745729646f407277e904b02991458f20d261 ] Some Chromebooks use hard-coded interrupts in their ACPI tables. This is an excerpt as dumped on Relm: ... Name (_HID, "ELAN0001") // _HID: Hardware ID Name (_DDN, "Elan Touchscreen ") // _DDN: DOS Device Name Name (_UID, 0x05) // _UID: Unique ID Name (ISTP, Zero) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (BUF0, ResourceTemplate () { I2cSerialBusV2 (0x0010, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2C1", 0x00, ResourceConsumer, , Exclusive, ) Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive, ,, ) { 0x000000B8, } }) Return (BUF0) /* \_SB_.I2C1.ETSA._CRS.BUF0 */ } ... This interrupt is hard-coded to 0xB8 = 184 which is too high to be mapped to IO-APIC, so no triggering information is propagated as acpi_register_gsi() fails and irqresource_disabled() is issued, which leads to erasing triggering and polarity information. Do not overwrite flags as it leads to erasing triggering and polarity information which might be useful in case of hard-coded interrupts. This way the information can be read later on even though mapping to APIC domain failed. Signed-off-by: Angela Czubak <acz@semihalf.com> [ rjw: Changelog rearrangement ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ioport.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 55de385c839c..647744d8514e 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -331,7 +331,7 @@ static inline void irqresource_disabled(struct resource *res, u32 irq)
{
res->start = irq;
res->end = irq;
- res->flags = IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET;
+ res->flags |= IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET;
}
extern struct address_space *iomem_get_mapping(void);