All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Markus Stockhausen" <markus.stockhausen@gmx.de>
To: "'Thomas Gleixner'" <tglx@kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: AW: [PATCH 1/2] irqchip/irq-realtek-rtl: Add/simplify register helpers
Date: Thu, 4 Jun 2026 14:32:26 +0200	[thread overview]
Message-ID: <029301dcf41e$337ae300$9a70a900$@gmx.de> (raw)
In-Reply-To: <87wlwf62hr.ffs@fw13>

> Von: Thomas Gleixner <tglx@kernel.org> 
> Gesendet: Mittwoch, 3. Juni 2026 17:57
> An: Markus Stockhausen <markus.stockhausen@gmx.de>;
linux-kernel@vger.kernel.org
> Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
> 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.

[    0.009035] ------------[ cut here ]------------
[    0.014075] WARNING: CPU: 0 PID: 0 at init/main.c:1059
start_kernel+0x3a0/0x510
[    0.022115] Interrupts were enabled early
[    0.026483] Modules linked in:
[    0.029846] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.18.33 #0
NONE
[    0.029871] Hardware name: Linksys LGS328C
[    0.029878] Stack : 80b7dddc 00000031 00000000 00000001 00000000 00000000
00000000 00000000
[    0.029929]         00000000 00000000 00000000 00000000 00000000 00000001
80b7dd98 00000000
[    0.029975]         00000000 00000000 80a846d4 80b7dc30 00000000 ffffefff
00000001 00000031
[    0.030022]         00000033 80b7dbf4 00000033 00000264 00000001 00000000
80a846d4 80b7dea8
[    0.030069]         00000000 80c23ec4 80b95238 80100000 00000000 80b9d4d0
00000000 813a0000
[    0.030116]         ...
[    0.030125] Call Trace:
[    0.030129] [<80114e38>] show_stack+0x28/0xf0
[    0.030163] [<8010e0ec>] dump_stack_lvl+0x70/0xb0
[    0.030197] [<801390cc>] __warn+0x9c/0x114
[    0.030227] [<801392c4>] warn_slowpath_fmt+0x180/0x188
[    0.030246] [<80c23ec4>] start_kernel+0x3a0/0x510

This goes away with switching to guard(raw_spinlock_irqsave)().

Anything I'm missing here?

Thanks in advance.

Markus


  reply	other threads:[~2026-06-04 12:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 18:46 [PATCH 0/2] irqchip/irq-realtek-rtl: Add multicore support Markus Stockhausen
2026-05-12 18:46 ` [PATCH 1/2] irqchip/irq-realtek-rtl: Add/simplify register helpers Markus Stockhausen
2026-06-03 15:57   ` Thomas Gleixner
2026-06-04 12:32     ` Markus Stockhausen [this message]
2026-06-04 12:39       ` AW: " Thomas Gleixner
2026-05-12 18:46 ` [PATCH 2/2] irqchip/irq-realtek-rtl: Add multicore support Markus Stockhausen
2026-06-03 16:02   ` Thomas Gleixner
2026-06-04 11:50     ` AW: " Markus Stockhausen
2026-05-22 17:46 ` AW: [PATCH 0/2] " Markus Stockhausen

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='029301dcf41e$337ae300$9a70a900$@gmx.de' \
    --to=markus.stockhausen@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.