Re: [PATCH] serial: 8250_pnp: pass IRQ shared flag to UART ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 09, 2020 at 12:42:27PM +0800, Li RongQing wrote:
> On some systems IRQ lines might be shared between multiple devices.
> If so, the irqflags have to be configured accordingly. The reason is:
> The 8250 port startup code performs IRQ tests *before* the IRQ handler
> for that particular port is registered.

Thanks for the report.

Before we proceed with it, can we have more information about the device in question?
How is it enumerated? What is in resources (ACPI / or ...?) for this device?
Also how IPMI is being involved to all this and why?

> This commit fixed the below issue:
> [  973.782131] 8250 request irq 00000000f5a0e2ae 00000000f5a0e2ae 0
> [  973.785414] genirq: Flags mismatch irq 16. 00000004 (ttyS0) vs. 00000084 (ipmi_si)
> [  973.788741] CPU: 0 PID: 1 Comm: systemd Tainted: G            E     4.19.0-1.0.0.1.rc2 #5
> [  973.792112] Hardware name: Huawei TaiShan 2280 V2/BC82AMDDA, BIOS 0.18 06/10/2019
> [  973.795577] Call trace:
> [  973.799018]  dump_backtrace+0x0/0x198
> [  973.802493]  show_stack+0x24/0x30
> [  973.805965]  dump_stack+0x9c/0xbc
> [  973.809357]  __setup_irq+0x150/0x6c0
> [  973.812663]  request_threaded_irq+0xe8/0x180
> [  973.815891]  univ8250_setup_irq+0x278/0x2a0
> [  973.819007]  serial8250_do_startup+0x468/0x818
> [  973.822060]  serial8250_startup+0x38/0x48

Nit: no need to put entire stack for this.

> --- a/drivers/tty/serial/8250/8250_pnp.c
> +++ b/drivers/tty/serial/8250/8250_pnp.c
> @@ -476,6 +476,7 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
>  		uart.port.flags |= UPF_SHARE_IRQ;
>  	uart.port.uartclk = 1843200;
>  	uart.port.dev = &dev->dev;
> +	uart.port.irqflags |= IRQF_SHARED;

Why not to use UPF_SHARE_IRQ flags instead?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux