From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F5C1C433E0 for ; Mon, 25 May 2020 10:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E422C20787 for ; Mon, 25 May 2020 10:38:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389836AbgEYKi3 (ORCPT ); Mon, 25 May 2020 06:38:29 -0400 Received: from mga05.intel.com ([192.55.52.43]:57012 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389812AbgEYKi3 (ORCPT ); Mon, 25 May 2020 06:38:29 -0400 IronPort-SDR: V84zDChHw/HhRXReTv+jGecjkBcFqi7pE9rhzk9lqIjnq9d0rNzcpCEdwVYsXOjy3JXHowKVoW FeZsNd6nOJoA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2020 03:38:28 -0700 IronPort-SDR: FzHnUj38vD7uccRSr5qhqk8pi9HmSPCEnWEKEvjuwlIcsw7jPsFSubKLshQSzMLIK/g7eD9Uob +EuV92xH0TEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,433,1583222400"; d="scan'208";a="468017629" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga006.fm.intel.com with ESMTP; 25 May 2020 03:38:27 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jdAV4-008loA-2L; Mon, 25 May 2020 13:38:30 +0300 Date: Mon, 25 May 2020 13:38:30 +0300 From: Andy Shevchenko To: Guenter Roeck Cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, Sebastian Andrzej Siewior , Tony Lindgren Subject: Re: [PATCH v3 2/6] serial: core: Allow detach and attach serial device for console Message-ID: <20200525103830.GO1634618@smile.fi.intel.com> References: <20200217114016.49856-1-andriy.shevchenko@linux.intel.com> <20200217114016.49856-3-andriy.shevchenko@linux.intel.com> <20200524171032.GA218301@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200524171032.GA218301@roeck-us.net> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org On Sun, May 24, 2020 at 10:10:32AM -0700, Guenter Roeck wrote: > On Mon, Feb 17, 2020 at 01:40:12PM +0200, Andy Shevchenko wrote: > > - if (uart_console_enabled(port)) > > + if (uart_console(port)) > > This results in lockdep splashes such as the one attached below. Is there > any special reason for this change ? It is not really explained in the > commit description. Thanks for the report. Yes, because imx_uart_init() doesn't properly register a console. I'll send a quick fix for that soon. > [ 15.439094] INFO: trying to register non-static key. > [ 15.439146] the code is fine but needs lockdep annotation. > [ 15.439196] turning off the locking correctness validator. > [ 15.439392] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-rc6-00244-gcaffb99b6929 #1 > [ 15.439469] Hardware name: Freescale i.MX6 Ultralite (Device Tree) > [ 15.439887] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [ 15.439982] [] (show_stack) from [] (dump_stack+0xe4/0x11c) > [ 15.440053] [] (dump_stack) from [] (register_lock_class+0x8a0/0x924) > [ 15.440127] [] (register_lock_class) from [] (__lock_acquire+0x6c/0x2e80) > [ 15.440202] [] (__lock_acquire) from [] (lock_acquire+0xf8/0x4f4) > [ 15.440274] [] (lock_acquire) from [] (_raw_spin_lock_irqsave+0x50/0x64) > [ 15.440350] [] (_raw_spin_lock_irqsave) from [] (uart_add_one_port+0x3a4/0x504) > [ 15.440431] [] (uart_add_one_port) from [] (platform_drv_probe+0x48/0x98) > [ 15.440506] [] (platform_drv_probe) from [] (really_probe+0x214/0x344) > [ 15.440578] [] (really_probe) from [] (driver_probe_device+0x5c/0x16c) > [ 15.440650] [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) > [ 15.440727] [] (device_driver_attach) from [] (__driver_attach+0x84/0xc0) > [ 15.440800] [] (__driver_attach) from [] (bus_for_each_dev+0x70/0xb4) > [ 15.440874] [] (bus_for_each_dev) from [] (bus_add_driver+0x154/0x1e0) > [ 15.440946] [] (bus_add_driver) from [] (driver_register+0x74/0x108) > [ 15.441020] [] (driver_register) from [] (imx_uart_init+0x20/0x40) > [ 15.441090] [] (imx_uart_init) from [] (do_one_initcall+0x80/0x3ac) > [ 15.441162] [] (do_one_initcall) from [] (kernel_init_freeable+0x170/0x204) > [ 15.441241] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x118) > [ 15.441313] [] (kernel_init) from [] (ret_from_fork+0x14/0x20) > [ 15.441414] Exception stack(0xc609ffb0 to 0xc609fff8) > [ 15.441571] ffa0: 00000000 00000000 00000000 00000000 > [ 15.441738] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > [ 15.441872] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 -- With Best Regards, Andy Shevchenko