From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751055AbbE0EJf (ORCPT ); Wed, 27 May 2015 00:09:35 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:54360 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbbE0EJd (ORCPT ); Wed, 27 May 2015 00:09:33 -0400 Date: Tue, 26 May 2015 21:09:30 -0700 From: Darren Hart To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Dmitry Torokhov , Valdis Kletnieks , lkml , platform-driver-x86@vger.kernel.org, Matthew Garrett , Greg Kroah-Hartman Subject: Re: dell_rbtn - kernel panic at boot... Message-ID: <20150527040930.GA14480@fury.dvhart.com> References: <5875.1432260403@turing-police.cc.vt.edu> <201505230305.36633@pali> <20150525044432.GA38428@fury.dvhart.com> <20150525144014.GC23037@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150525144014.GC23037@pali> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 25, 2015 at 04:40:14PM +0200, Pali Rohár wrote: > On Sunday 24 May 2015 21:44:32 Darren Hart wrote: > > On Sat, May 23, 2015 at 03:05:36AM +0200, Pali Rohár wrote: > > > On Saturday 23 May 2015 00:53:16 Dmitry Torokhov wrote: > > > > On Thu, May 21, 2015 at 7:06 PM, Valdis Kletnieks > > > > > > > > wrote: > > > > > So after I made both config variables =y, the resulting kernel > > > > > built, but died a glorious death at boot. > > > > > > > > I guess if both are built-in then, according to link order, > > > > dell-laptop starts first, before dell-rbtn, and dies in > > > > dell_rbtn_notifier_register() in call to > > > > driver_for_each_device(&rbtn_driver.drv, ...) because rbtn_driver has > > > > not been registered yet and thus half-initlalized. > > > > > > > > Thanks. > > > > > > pr_debug() messages could be useful... but no idea if we can get them. > > > > > > Is there any way to fix that dependency race condition? Could > > > driver_attach() function call help? > > > > I believe you can avoid this by moving dell-rbtn earlier in the Makefile than > > dell-laptop - but this is fragile and a hack to resolve a dependency problem. > > > > And what about that late_initcall() instead module_init() in dell-laptop? > Will it fix this problem? > No, because late_initcall() for modules is module_init(). See include/linux/init.h. -- Darren Hart Intel Open Source Technology Center