From nobody Sat Jul 25 23:41:39 2026 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04C6D24336D for ; Sat, 11 Jul 2026 08:24:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783758252; cv=none; b=U1lvs1r4b/uEg2OF3w/NdOEUyfIZHj6N08K4hhc1pk+jMxTi0ZmdD0Odf6MG5HE5EMssSNIwCa2vy3M6c8qS48TZRC6+f7RZjN2b4sv4fIN6zEoLbnsArTJ1NDVvU25W2kZLlK+u0jOTRsoa5Pdl03DrFudRARizXMqY6RbgO9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783758252; c=relaxed/simple; bh=QOgHidMJJqW9ubhTqStlnqMxHWR4XaU1uMKVvF/RGS0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TmfDFDt1S8fO1p3agbUErRsV6cyxT/+NPl16SSLcr0+7Dfm6v4fWrUi9RC5+eU2vU0uOf05Cq5mUMm0Mz+GhZKvcqtT9ReW+hum5FIWPPnZ9ScjSq90i+aHAlrJy54QXk/YxLOdmA64+EUoA5bbkrKoLVFhm7xoptoUpChU+2hk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=IAijTzX5; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="IAijTzX5" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 4817187533; Sat, 11 Jul 2026 10:24:00 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id E46YGO9GmXt8; Sat, 11 Jul 2026 10:23:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1783758239; bh=QOgHidMJJqW9ubhTqStlnqMxHWR4XaU1uMKVvF/RGS0=; h=From:To:Cc:Subject:Date; b=IAijTzX56VonFjMi4qAENoA1KdxaYYGyIghL5jfAn6IUv/Quxt8bjfYWCMVuH7zf9 7ZKq/D5IbB8JE1MtSozVR/fSVaoBR4dgUpX1EIZQXA5DbVuZPuc7sKGhBo0QqbW2YR pnDcElG7P56p3L2AA0xwUea1uz8Vs5HpTv9j3K4nWuiv1fFsDsmgP3cyxMFij3wjLL B+rtzwDJs/3cR9mnYFiE2407ta2m6ImBAwlMs6V7VA5XXrk3yRVXyFjWHl78plRvJ2 tc5lxVIqOmYG9bv7K1YjhLb+HbhDlRcpNH2xUzDK810asjtVZgslobN4JH3GW1Q+zi Q1ehC2QsTkCrg== From: Rustam Adilov To: Thomas Gleixner , Birger Koblitz , Bert Vermeulen , John Crispin , linux-kernel@vger.kernel.org Cc: Rustam Adilov , Carlo Szelinsky Subject: [PATCH] irqchip/irq-realtek-rtl: change to __raw reads and writes Date: Sat, 11 Jul 2026 13:23:28 +0500 Message-ID: <20260711082328.43535-1-adilov@disroot.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To make the interrupt driver operable with SWAP_IO_SPACE config enabled, replace all instances of readl/writel with their __raw variants. Otherwise readl/writel will do a byte swap which this driver does not intend to do. Tested-by: Carlo Szelinsky Signed-off-by: Rustam Adilov --- drivers/irqchip/irq-realtek-rtl.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/irqchip/irq-realtek-rtl.c b/drivers/irqchip/irq-realte= k-rtl.c index 4b59e0cd86bf..3077f4efb4e2 100644 --- a/drivers/irqchip/irq-realtek-rtl.c +++ b/drivers/irqchip/irq-realtek-rtl.c @@ -50,18 +50,18 @@ static inline void enable_gimr(unsigned int cpu, unsign= ed int hw_irq) { u32 gimr; =20 - gimr =3D readl(REG(cpu, RTL_ICTL_GIMR)); + gimr =3D __raw_readl(REG(cpu, RTL_ICTL_GIMR)); gimr |=3D BIT(hw_irq); - writel(gimr, REG(cpu, RTL_ICTL_GIMR)); + __raw_writel(gimr, REG(cpu, RTL_ICTL_GIMR)); } =20 static inline void disable_gimr(unsigned int cpu, unsigned int hw_irq) { u32 gimr; =20 - gimr =3D readl(REG(cpu, RTL_ICTL_GIMR)); + gimr =3D __raw_readl(REG(cpu, RTL_ICTL_GIMR)); gimr &=3D ~BIT(hw_irq); - writel(gimr, REG(cpu, RTL_ICTL_GIMR)); + __raw_writel(gimr, REG(cpu, RTL_ICTL_GIMR)); } =20 static void write_irr(unsigned int cpu, int hw_irq, u32 value) @@ -71,9 +71,9 @@ static void write_irr(unsigned int cpu, int hw_irq, u32 v= alue) unsigned int shift =3D IRR_SHIFT(hw_irq); u32 irr; =20 - irr =3D readl(irr0 + offset) & ~(0xf << shift); + irr =3D __raw_readl(irr0 + offset) & ~(0xf << shift); irr |=3D (value & 0xf) << shift; - writel(irr, irr0 + offset); + __raw_writel(irr, irr0 + offset); } =20 static void realtek_ictl_unmask_irq(struct irq_data *i) @@ -159,7 +159,8 @@ static void realtek_irq_dispatch(struct irq_desc *desc) unsigned int hw_irq; =20 chained_irq_enter(chip, desc); - pending =3D readl(REG(cpu, RTL_ICTL_GIMR)) & readl(REG(cpu, RTL_ICTL_GISR= )) & output->mask; + pending =3D __raw_readl(REG(cpu, RTL_ICTL_GIMR)) & + __raw_readl(REG(cpu, RTL_ICTL_GISR)) & output->mask; =20 if (unlikely(!pending)) { spurious_interrupt(); --=20 2.55.0