From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Jarzmik Subject: Re: [PATCH V2] serial: pxa: hold port.lock when reporting modem line changes Date: Wed, 26 Nov 2014 18:10:29 +0100 Message-ID: <87egsp3n22.fsf@free.fr> References: <1416993716-21005-1-git-send-email-dbaryshkov@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:31707 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbaKZRKm (ORCPT ); Wed, 26 Nov 2014 12:10:42 -0500 In-Reply-To: <1416993716-21005-1-git-send-email-dbaryshkov@gmail.com> (Dmitry Eremin-Solenikov's message of "Wed, 26 Nov 2014 12:21:56 +0300") Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Dmitry Eremin-Solenikov Cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Dmitry Eremin-Solenikov writes: > Both uart_handle_dcd_change() and uart_handle_cts_change() require a > port lock to be held and will emit a warning when lockdep is enabled. > Held corresponding lock. > > This fixes the following warnings: > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2760 uart_handle_dcd_change+0xc8/0xf8() > Modules linked in: > CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.0-rc5+ #26 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c) > [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) > [] (warn_slowpath_null) from [] (uart_handle_dcd_change+0xc8/0xf8) > [] (uart_handle_dcd_change) from [] (serial_pxa_irq+0x268/0x3b0) > [] (serial_pxa_irq) from [] (handle_irq_event_percpu+0x50/0x16c) > [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c) > [] (handle_irq_event) from [] (handle_level_irq+0x94/0x118) > [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x30) > [] (generic_handle_irq) from [] (__handle_domain_irq+0x38/0x70) > [] (__handle_domain_irq) from [] (ichp_handle_irq+0x24/0x34) > [] (ichp_handle_irq) from [] (__irq_svc+0x44/0x54) > Exception stack(0xc07c7f58 to 0xc07c7fa0) > 7f40: 00000001 00000001 > 7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000 > 7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff > [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x38) > [] (arch_cpu_idle) from [] (cpu_startup_entry+0x1b8/0x220) > [] (cpu_startup_entry) from [] (start_kernel+0x39c/0x40c) > ---[ end trace 4c1b7ae03f6d9d30 ]--- > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2791 uart_handle_cts_change+0xa0/0xdc() > Modules linked in: > CPU: 0 PID: 0 Comm: swapper Tainted: G W 3.18.0-rc5+ #26 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c) > [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) > [] (warn_slowpath_null) from [] (uart_handle_cts_change+0xa0/0xdc) > [] (uart_handle_cts_change) from [] (serial_pxa_irq+0x258/0x3b0) > [] (serial_pxa_irq) from [] (handle_irq_event_percpu+0x50/0x16c) > [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c) > [] (handle_irq_event) from [] (handle_level_irq+0x94/0x118) > [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x30) > [] (generic_handle_irq) from [] (__handle_domain_irq+0x38/0x70) > [] (__handle_domain_irq) from [] (ichp_handle_irq+0x24/0x34) > [] (ichp_handle_irq) from [] (__irq_svc+0x44/0x54) > Exception stack(0xc07c7f58 to 0xc07c7fa0) > 7f40: 00000001 00000001 > 7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000 > 7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff > [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x38) > [] (arch_cpu_idle) from [] (cpu_startup_entry+0x1b8/0x220) > [] (cpu_startup_entry) from [] (start_kernel+0x39c/0x40c) > ---[ end trace 4c1b7ae03f6d9d31 ]--- > > Signed-off-by: Dmitry Eremin-Solenikov > --- > [Changes since v1 - lock whole function, not just check_modem_status().] Acked-by: Robert Jarzmik -- Robert From mboxrd@z Thu Jan 1 00:00:00 1970 From: robert.jarzmik@free.fr (Robert Jarzmik) Date: Wed, 26 Nov 2014 18:10:29 +0100 Subject: [PATCH V2] serial: pxa: hold port.lock when reporting modem line changes In-Reply-To: <1416993716-21005-1-git-send-email-dbaryshkov@gmail.com> (Dmitry Eremin-Solenikov's message of "Wed, 26 Nov 2014 12:21:56 +0300") References: <1416993716-21005-1-git-send-email-dbaryshkov@gmail.com> Message-ID: <87egsp3n22.fsf@free.fr> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Dmitry Eremin-Solenikov writes: > Both uart_handle_dcd_change() and uart_handle_cts_change() require a > port lock to be held and will emit a warning when lockdep is enabled. > Held corresponding lock. > > This fixes the following warnings: > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2760 uart_handle_dcd_change+0xc8/0xf8() > Modules linked in: > CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.0-rc5+ #26 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c) > [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) > [] (warn_slowpath_null) from [] (uart_handle_dcd_change+0xc8/0xf8) > [] (uart_handle_dcd_change) from [] (serial_pxa_irq+0x268/0x3b0) > [] (serial_pxa_irq) from [] (handle_irq_event_percpu+0x50/0x16c) > [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c) > [] (handle_irq_event) from [] (handle_level_irq+0x94/0x118) > [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x30) > [] (generic_handle_irq) from [] (__handle_domain_irq+0x38/0x70) > [] (__handle_domain_irq) from [] (ichp_handle_irq+0x24/0x34) > [] (ichp_handle_irq) from [] (__irq_svc+0x44/0x54) > Exception stack(0xc07c7f58 to 0xc07c7fa0) > 7f40: 00000001 00000001 > 7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000 > 7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff > [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x38) > [] (arch_cpu_idle) from [] (cpu_startup_entry+0x1b8/0x220) > [] (cpu_startup_entry) from [] (start_kernel+0x39c/0x40c) > ---[ end trace 4c1b7ae03f6d9d30 ]--- > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2791 uart_handle_cts_change+0xa0/0xdc() > Modules linked in: > CPU: 0 PID: 0 Comm: swapper Tainted: G W 3.18.0-rc5+ #26 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c) > [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) > [] (warn_slowpath_null) from [] (uart_handle_cts_change+0xa0/0xdc) > [] (uart_handle_cts_change) from [] (serial_pxa_irq+0x258/0x3b0) > [] (serial_pxa_irq) from [] (handle_irq_event_percpu+0x50/0x16c) > [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c) > [] (handle_irq_event) from [] (handle_level_irq+0x94/0x118) > [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x30) > [] (generic_handle_irq) from [] (__handle_domain_irq+0x38/0x70) > [] (__handle_domain_irq) from [] (ichp_handle_irq+0x24/0x34) > [] (ichp_handle_irq) from [] (__irq_svc+0x44/0x54) > Exception stack(0xc07c7f58 to 0xc07c7fa0) > 7f40: 00000001 00000001 > 7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000 > 7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff > [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x38) > [] (arch_cpu_idle) from [] (cpu_startup_entry+0x1b8/0x220) > [] (cpu_startup_entry) from [] (start_kernel+0x39c/0x40c) > ---[ end trace 4c1b7ae03f6d9d31 ]--- > > Signed-off-by: Dmitry Eremin-Solenikov > --- > [Changes since v1 - lock whole function, not just check_modem_status().] Acked-by: Robert Jarzmik -- Robert