From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AACF47886A for ; Thu, 4 Jun 2026 12:39:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780576781; cv=none; b=V5xEt7aaxZecMjEO6vOg/yJgZPQ6d6gzzXY1SuFMdewIZA6aQ/dD3Be95DnBLHDw+c5M2oa6Mr61N8nv3yBSOJQGXe5EvFls0ipGGYrbPty/8+7mqBi1fGDIMdZDd5QWK3BPOoX5Ro7WXn9a5GlTpPx/m2tc0pbJtzIN4/qTB70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780576781; c=relaxed/simple; bh=qXk4Yox7fPbck7O3A9+ESv2lSndwLmsYC25aD5emjEM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Utejygrtr0qyrSK71Qb/v95sJzvB5dG0O2LNYbtknIWEnSnBmG5t7Z+Ou9xm9Ym133KdAFoM9gkH2bdVPHDbIb9XeT5Svh2rMzjO05an40VLkQiSM3FLl7r6OCN+xnzUQt58bxqmh8H96CbPgFOs1cG2wd3jIWcd4n5a8OnQpEc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZccW91aG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZccW91aG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DBD91F00893; Thu, 4 Jun 2026 12:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780576779; bh=riWzbRN6ra45HOE+IHN3rApp+MiPrfajPskMVNNdwDA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ZccW91aGfqgKOOL8xngH6qyEosPFC2Ka7uREGm3PqGKER+1hmcKh01sx/13C8biH+ jRf9NKktp8fEDqgWxQbWeqDmsq5bFSaT5H0kgocr9SxUOHPJZaVqTfxO0QvUwgNfmF s3HuNbJDR30BojBpGUGUUFLOE/OQluHXA6JtZ7WwHY4InktODfifbciBZitLxdp2qA vrh1cfCBFxPDuP9gLSoZQ3aGtDxMGfvJNnraAfuFkc291yq6gxF+IsUBkdwx57aRWc XaJSPqvTRzoMaJKDItE6YIu8htR4UPAJfz7MVHOPpoWTPH/vz0HjTYLbjrjSFLNtiY N2DuYzjsecupQ== From: Thomas Gleixner To: Markus Stockhausen Cc: linux-kernel@vger.kernel.org Subject: Re: AW: [PATCH 1/2] irqchip/irq-realtek-rtl: Add/simplify register helpers In-Reply-To: <029301dcf41e$337ae300$9a70a900$@gmx.de> References: <20260512184646.1896480-1-markus.stockhausen@gmx.de> <20260512184646.1896480-2-markus.stockhausen@gmx.de> <87wlwf62hr.ffs@fw13> <029301dcf41e$337ae300$9a70a900$@gmx.de> Date: Thu, 04 Jun 2026 14:39:36 +0200 Message-ID: <877boe5vjr.ffs@fw13> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, Jun 04 2026 at 14:32, Markus Stockhausen wrote: >> Von: Thomas Gleixner >> Gesendet: Mittwoch, 3. Juni 2026 17:57 >> An: Markus Stockhausen ; > linux-kernel@vger.kernel.org >> Cc: Markus Stockhausen >> Betreff: Re: [PATCH 1/2] irqchip/irq-realtek-rtl: Add/simplify register > helpers >> ... >> > - >> > - value = readl(REG(RTL_ICTL_GIMR)); >> > - value &= ~BIT(i->hwirq); >> > - writel(value, REG(RTL_ICTL_GIMR)); >> > - >> > + disable_gimr(i->hwirq); >> > raw_spin_unlock_irqrestore(&irq_lock, flags); >> > } >> > >> > @@ -89,7 +98,7 @@ static int intc_map(struct irq_domain *d, unsigned int > irq, irq_hw_number_t hw) >> > irq_set_chip_and_handler(irq, &realtek_ictl_irq, handle_level_irq); >> > >> guard(raw_spinlock_irq)(&lock); >> >> _irq because this is task context. >> >> > raw_spin_lock_irqsave(&irq_lock, flags); >> > - write_irr(REG(RTL_ICTL_IRR0), hw, 1); >> > + write_irr(hw, 1); >> > raw_spin_unlock_irqrestore(&irq_lock, flags); >> > >> > return 0; > > The above is the only one of your guides I'm unsure about. > With the whole series adapted and applied I finally get > > static int intc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t > hw) > { > unsigned int cpu; > > irq_set_chip_and_handler(irq, &realtek_ictl_irq, handle_level_irq); > > guard(raw_spinlock_irq)(&irq_lock); > for_each_cpu(cpu, &realtek_ictl_cpu_configurable) > write_irr(cpu, hw, 1); > > return 0; > } > > Boot gives a warning. Indeed. If map() is invoked during early boot, you need _irqsave.