[PATCH v4] serial: 8250: Fix autoconfig_irq() to avoid race conditions

2015-08-16 Thread Taichi Kageyama
ot once it occurs because the boot sequence is always almost same. port mutex makes sure that the autoconfig operation is exclusive of any other concurrent HW access except by the console operation. console lock is required in autoconfig_irq(). Signed-off-by: Taichi Kageyama Cc: Naoya Horiguc

Re: [PATCH v3] serial: 8250: Fix autoconfig_irq() to avoid race conditions

2015-08-16 Thread Taichi Kageyama
Hi Greg, On 2015/08/15 9:10, gre...@linuxfoundation.org wrote: > On Mon, Aug 10, 2015 at 12:15:40AM +0000, Taichi Kageyama wrote: >> The following race conditions can happen when a serial port is used >> as console. >> >> Case1: CPU_B is used to detect an i

[PATCH v3] serial: 8250: Fix autoconfig_irq() to avoid race conditions

2015-08-09 Thread Taichi Kageyama
ot once it occurs because the boot sequence is always almost same. port mutex makes sure that the autoconfig operation is exclusive of any other concurrent HW access except by the console operation. console lock is required in autoconfig_irq(). Signed-off-by: Taichi Kageyama Cc: Naoya Horiguc

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-31 Thread Taichi Kageyama
On 2015/07/31 8:43, Peter Hurley wrote: > On 07/30/2015 06:12 PM, Thomas Gleixner wrote: >> On Thu, 30 Jul 2015, Peter Hurley wrote: >>> Honestly, I'm not too sure this is the way to go. >>> >>> Messing around with irqsoff tracer for 30 mins turned up: >>> 3.664ms in intel_unmap_page >>> - iotlb

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Taichi Kageyama
On 2015/07/29 22:35, Thomas Gleixner wrote: > On Wed, 29 Jul 2015, Peter Hurley wrote: >> On 07/29/2015 07:53 AM, Thomas Gleixner wrote: >>> On Wed, 29 Jul 2015, Peter Hurley wrote: >>>> On 07/29/2015 06:32 AM, Thomas Gleixner wrote: >>>>> On Wed, 29 J

[RFC PATCH v2 2/3] genirq: Add a function to set irq affinity of candidate IRQs

2015-07-29 Thread Taichi Kageyama
h CPU detects the interrupt and reduce the risk of the failure as far as possible. Signed-off-by: Taichi Kageyama Cc: Naoya Horiguchi Cc: Peter Hurley --- include/linux/interrupt.h | 4 kernel/irq/autoprobe.c| 31 +++ 2 files changed, 35 insertions(+)

Re: [PATCH 1/2] serial: 8250: Fix autoconfig_irq() to avoid race conditions

2015-07-29 Thread Taichi Kageyama
On 2015/07/24 7:32, gre...@linuxfoundation.org wrote: > On Fri, Jun 05, 2015 at 09:57:40AM +0000, Taichi Kageyama wrote: >> The following race conditions can happen if a serial is used as console. >> Case1. CPU_B handles an interrupt from a serial >> autoconfig_ir

[RFC PATCH v2 3/3] serial: 8250: Fix autoconfig_irq() to reduce the risk of failure

2015-07-29 Thread Taichi Kageyama
autoconfig_irq() expects a CPU detects an interrupt from a serial port, but it doesn't work when the CPU has interrupts disabled during the waiting time. New one tries to specify own CPU to probe the interrupt and reduce the risk of the failure as far as possible. Signed-off-by: Taichi Kag

[RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Taichi Kageyama
his problem This is based on Peter's idea. It depends on v2 2/3 to set irq affinity. Taichi Kageyama (3): serial: 8250: Fix autoconfig_irq() to avoid race conditions genirq: Add a function to set irq affinity of candidate IRQs serial: 8250: Fix autoconfig_irq() to reduce the risk of

[RFC PATCH v2 1/3] serial: 8250: Fix autoconfig_irq() to avoid race conditions

2015-07-29 Thread Taichi Kageyama
ot once it occurs because the boot sequence is always almost same. port mutex makes sure that the autoconfig operation is exclusive of any other concurrent HW access except by the console operation. console lock is required in autoconfig_irq(). Signed-off-by: Taichi Kageyama Cc: Naoya Horiguc

Re: [PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-07-29 Thread Taichi Kageyama
On 2015/07/28 4:44, Peter Hurley wrote: > On 07/21/2015 05:44 AM, Taichi Kageyama wrote: >> On 2015/07/21 1:36, Peter Hurley wrote: >>> On 07/16/2015 05:58 AM, Taichi Kageyama wrote: >>>> On 2015/07/15 4:29, Peter Hurley wrote: >>>>> On 07/13/2015 09:16

Re: [PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-07-21 Thread Taichi Kageyama
Hi Peter, On 2015/07/21 1:36, Peter Hurley wrote: > On 07/16/2015 05:58 AM, Taichi Kageyama wrote: >> On 2015/07/15 4:29, Peter Hurley wrote: >>> On 07/13/2015 09:16 PM, Taichi Kageyama wrote: >>>> On 2015/07/11 9:12, Peter Hurley wrote: >>>>>

Re: [PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-07-16 Thread Taichi Kageyama
Hi Peter, On 2015/07/15 4:29, Peter Hurley wrote: > On 07/13/2015 09:16 PM, Taichi Kageyama wrote: >> On 2015/07/11 9:12, Peter Hurley wrote: >>> On 07/09/2015 01:32 AM, Taichi Kageyama wrote: >>>> On 2015/07/08 23:00, Prarit Bhargava wrote: >>>>&g

Re: [PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-07-13 Thread Taichi Kageyama
On 2015/07/11 9:12, Peter Hurley wrote: > On 07/09/2015 01:32 AM, Taichi Kageyama wrote: >> On 2015/07/08 23:00, Prarit Bhargava wrote: >>> On 07/08/2015 09:51 AM, Peter Hurley wrote: >>>> On 07/08/2015 08:53 AM, Prarit Bhargava wrote: >>>>> On 07/08/20

Re: [PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-07-08 Thread Taichi Kageyama
the platform and device type? >> > > Taichi? I saw the original problem on x86-64 platforms with RHEL6.6. The serial was SOL(serial over LAN), not registered as PnP device. Thanks, Taichi > > P. > >> Regards, >> Peter Hurley >> >> >>> P. >>&

Re: [PATCH 0/2] serial: 8250: Workaround to avoid irq=0 for console

2015-07-07 Thread Taichi Kageyama
On 2015/06/05 18:55, Taichi Kageyama wrote: > This patch set provides a workaround to avoid the following problem. > It's based on Linux 4.1-rc3 mainstream kernel. > I've tested this patch set on x86-64 machine and KVM. > > Problem > -- > Ther

[PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-06-05 Thread Taichi Kageyama
mber. For non-console serials, this workaround is not required because setserial command can kick autoconfig_irq() again for them. Signed-off-by: Taichi Kageyama Cc: Naoya Horiguchi --- drivers/tty/serial/8250/8250_core.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(

[PATCH 1/2] serial: 8250: Fix autoconfig_irq() to avoid race conditions

2015-06-05 Thread Taichi Kageyama
happens easily. This problem happens with high rate every boot once it occurs because the boot sequence is always almost same. Signed-off-by: Taichi Kageyama Cc: Naoya Horiguchi --- drivers/tty/serial/8250/8250_core.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --

[PATCH 0/2] serial: 8250: Workaround to avoid irq=0 for console

2015-06-05 Thread Taichi Kageyama
How to assure the interrupt of the CPU enabled during auto_irq - How to know which CPU can handle an interrupt from a serial. Do you have any other idea? In my opinion, providing a workaround is better than applying big changes to the old function for legacy devices. Taichi Kageyama (2): se