public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Ai Chao <aichao@kylinos.cn>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	rafael@kernel.org, linux-acpi@vger.kernel.org
Subject: [PATCH AUTOSEL 6.19-6.12] ACPI: resource: Add JWIPC JVC9100 to irq1_level_low_skip_override[]
Date: Wed, 11 Feb 2026 07:30:40 -0500	[thread overview]
Message-ID: <20260211123112.1330287-30-sashal@kernel.org> (raw)
In-Reply-To: <20260211123112.1330287-1-sashal@kernel.org>

From: Ai Chao <aichao@kylinos.cn>

[ Upstream commit ba6ded26dffe511b862a98a25955955e7154bfa8 ]

Like the JWIPC JVC9100 has its serial IRQ (10 and 11) described
as ActiveLow in the DSDT, which the kernel overrides to EdgeHigh which
breaks the serial.

irq 10, level, active-low, shared, skip-override
irq 11, level, active-low, shared, skip-override

Add the JVC9100 to the irq1_level_low_skip_override[] quirk table to fix
this.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Link: https://patch.msgid.link/20260113072719.4154485-1-aichao@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

Now I have a complete picture. Let me compile the full analysis.

---

## Detailed Analysis

### 1. COMMIT MESSAGE ANALYSIS

The commit adds the JWIPC JVC9100 industrial PC board to the
`irq1_level_low_skip_override[]` DMI quirk table in
`drivers/acpi/resource.c`. The commit message clearly states the
problem: serial IRQs 10 and 11 are described as ActiveLow in the DSDT,
but the kernel incorrectly overrides them to EdgeHigh, which **breaks
serial communication** on the device. This is a classic ACPI IRQ
override quirk - a well-established pattern in the stable kernel tree.

The commit was authored by Ai Chao (Kylin OS engineer) and signed off by
Rafael J. Wysocki, the ACPI subsystem maintainer, indicating proper
review and acceptance.

### 2. CODE CHANGE ANALYSIS

The patch makes two types of changes, both to data tables in
`drivers/acpi/resource.c`:

**Part 1 - DMI table addition** (lines 535-540 in the patch):
A new DMI entry for the JWIPC JVC9100 board is added to
`irq1_level_low_skip_override[]`:

```c
{
    /* JWIPC JVC9100 */
    .matches = {
        DMI_MATCH(DMI_BOARD_NAME, "JVC9100"),
    },
},
```

**Part 2 - Override table entries** (new lines in `override_table[]`):

```c
{ irq1_level_low_skip_override, 10, ACPI_LEVEL_SENSITIVE,
ACPI_ACTIVE_LOW, 1, false },
{ irq1_level_low_skip_override, 11, ACPI_LEVEL_SENSITIVE,
ACPI_ACTIVE_LOW, 1, false },
```

These entries tell `acpi_dev_irq_override()` to return `false` (skip the
override) for IRQ 10 and 11 when they match level-sensitive, active-low,
shared parameters on systems in the DMI table.

**Why the override_table entries are needed**: Looking at the
`acpi_dev_irq_override()` function:

```712:751:/home/sasha/linux-autosel/drivers/acpi/resource.c
static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
                                  u8 shareable)
{
        // ... iterates override_table ...
        // If no match found:
        if (gsi != 1 && gsi != 12)
                return true;  // <-- IRQ 10/11 always gets overridden!
```

Without an `override_table` entry, IRQ 10 and 11 (not being 1 or 12)
always fall through to `return true`, meaning the kernel **always**
overrides the DSDT-specified IRQ configuration. The only way to prevent
this for specific systems is to add explicit entries to
`override_table[]`.

### 3. CLASSIFICATION

This is a **hardware quirk / workaround** - one of the explicit
exception categories that is appropriate for stable backporting. It
follows the identical pattern of dozens of other IRQ override quirk
additions that have been backported to stable trees. Checking the 6.12
stable branch confirms that numerous similar quirk additions (`Skip IRQ
override on ASUS Vivobook`, `Add LG 16T90SP`, `Add Asus Vivobook
X1504VAP`, etc.) have already been backported.

### 4. SCOPE AND RISK ASSESSMENT

**Size**: 8 lines added, 1 file changed. Purely data table additions.

**Nuance about `override_table` scope**: The new `override_table`
entries for IRQ 10/11 reference `irq1_level_low_skip_override`, which
contains ~20 other systems (Asus Vivobooks, Medion, LG laptops). This
means if ANY of those systems also have IRQ 10/11 described as
`ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, shareable=1` in their DSDT, the
override would be skipped for those too. However:
- Those are consumer laptops that typically don't have serial ports (IRQ
  10/11 are serial controller IRQs)
- Even if they matched, skipping the override is the correct behavior
  for these AMD Zen-based systems where the DSDT is authoritative
- The match requires a 4-way parameter match (IRQ number + triggering +
  polarity + shareable), making false positives essentially impossible

**Risk**: Very LOW. The change is purely additive to data tables.

### 5. USER IMPACT

JWIPC is a Chinese industrial PC manufacturer. The JVC9100 is an
industrial/embedded computing platform where serial ports
(RS-232/RS-485) are critical for connecting to industrial equipment,
sensors, PLCs, and other peripherals. Broken serial communication on an
industrial PC renders the device significantly less useful or completely
non-functional for its intended purpose.

### 6. STABILITY INDICATORS

- Accepted by the ACPI subsystem maintainer (Rafael J. Wysocki)
- Follows an extremely well-established quirk pattern with dozens of
  precedents
- Author from Kylin OS (a widely-used Chinese enterprise Linux
  distribution), suggesting real-world testing

### 7. DEPENDENCY CHECK

- **6.12 stable** (p-6.12): `irq1_level_low_skip_override[]` and the
  consolidated `override_table[]` structure exist. The patch should
  apply cleanly or with trivial context adjustments.
- **6.6 stable** (p-6.6): Uses the **pre-consolidation** structure with
  separate per-vendor DMI tables (`medion_laptop[]`, `asus_laptop[]`,
  etc.) and 6 `override_table[]` entries. This patch would need rework -
  a new DMI table for the JVC9100 would be needed.
- **6.1 stable and older**: Similar rework needed, plus the
  consolidation commit `d37273af0e428` introduced
  `irq1_level_low_skip_override` in v6.6-rc2.

The essential infrastructure (`override_table[]`, `irq_override_cmp`
struct with `override` bool, `acpi_dev_irq_override()` function) exists
since v6.0, so backporting is feasible to all current stable trees with
appropriate adjustments.

### 8. PRECEDENT

Looking at both `p-6.12` and `p-6.6` branches, numerous virtually
identical commits have been backported:
- "Skip IRQ override on ASUS Vivobook Pro N6506CU" (6bb7489f38d9e in
  6.12)
- "Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[]"
  (df8d1c8e67204 in 6.12)
- "Add LG 16T90SP to irq1_level_low_skip_override[]" (53f1a907d36fb in
  6.12, bdaab141edb6f in 6.6)
- And many more

This is one of the most commonly backported categories of changes in the
ACPI subsystem.

### Summary

This commit is a textbook stable-worthy hardware quirk. It adds a DMI
match for a specific industrial PC board and corresponding
`override_table` entries to prevent the kernel from incorrectly
overriding serial IRQ configuration, which breaks serial ports. It is
small (8 lines), contained (data-only), obviously correct (follows
established patterns), fixes a real user-visible bug (broken serial
ports on industrial hardware), and has zero risk of regression for other
systems. The ACPI subsystem maintainer approved it. Dozens of virtually
identical changes have been successfully backported to stable trees.

**YES**

 drivers/acpi/resource.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index d16906f46484d..bc8050d8a6f51 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -532,6 +532,12 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
 			DMI_MATCH(DMI_BOARD_NAME, "16T90SP"),
 		},
 	},
+	{
+		/* JWIPC JVC9100 */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "JVC9100"),
+		},
+	},
 	{ }
 };
 
@@ -706,6 +712,8 @@ struct irq_override_cmp {
 
 static const struct irq_override_cmp override_table[] = {
 	{ irq1_level_low_skip_override, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
+	{ irq1_level_low_skip_override, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 1, false },
+	{ irq1_level_low_skip_override, 11, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 1, false },
 	{ irq1_edge_low_force_override, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
 };
 
-- 
2.51.0


  parent reply	other threads:[~2026-02-11 12:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 12:30 [PATCH AUTOSEL 6.19-5.10] s390/perf: Disable register readout on sampling events Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] arm64: Add support for TSV110 Spectre-BHB mitigation Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] xenbus: Use .freeze/.thaw to handle xenbus devices Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] s390/purgatory: Add -Wno-default-const-init-unsafe to KBUILD_CFLAGS Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] s390/boot: " Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.1] perf/arm-cmn: Support CMN-600AE Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] ntfs: ->d_compare() must not block Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.12] ACPI: x86: s2idle: Invoke Microsoft _DSM Function 9 (Turn On Display) Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.12] block: decouple secure erase size limit from discard size limit Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] sparc: don't reference obsolete termio struct for TC* constants Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] EFI/CPER: don't go past the ARM processor CPER record buffer Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19] ACPI: scan: Use async schedule function in acpi_scan_clear_dep_fn() Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.6] cpufreq: dt-platdev: Block the driver from probing on more QC platforms Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] EFI/CPER: don't dump the entire memory region Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.12] ACPI: battery: fix incorrect charging status when current is zero Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] rust: cpufreq: always inline functions using build_assert with arguments Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] blk-mq-sched: unify elevators checking for async requests Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.12] APEI/GHES: ARM processor Error: don't go past allocated memory Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] md raid: fix hang when stopping arrays with metadata through dm-raid Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] tools/power cpupower: Reset errno before strtoull() Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] sparc: Synchronize user stack on fork and clone Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] blk-mq-debugfs: add missing debugfs_mutex in blk_mq_debugfs_register_hctxs() Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] rnbd-srv: Zero the rsp buffer before using it Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.12] alpha: fix user-space corruption during memory compaction Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] ACPICA: Abort AML bytecode execution when executing AML_FATAL_OP Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19] arm64: mte: Set TCMA1 whenever MTE is present in the kernel Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] tools/cpupower: Fix inverted APERF capability check Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.15] ACPI: processor: Fix NULL-pointer dereference in acpi_processor_errata_piix4() Sasha Levin
2026-02-11 12:30 ` Sasha Levin [this message]
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.6] perf/cxlpmu: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.6] md-cluster: fix NULL pointer dereference in process_metadata_update Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-5.10] APEI/GHES: ensure that won't go past CPER allocated record Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.12] powercap: intel_rapl: Add PL4 support for Ice Lake Sasha Levin
2026-02-11 12:30 ` [PATCH AUTOSEL 6.19-6.18] io_uring/timeout: annotate data race in io_flush_timeouts() 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=20260211123112.1330287-30-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=aichao@kylinos.cn \
    --cc=linux-acpi@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=rafael.j.wysocki@intel.com \
    --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