Received: by 10.192.165.148 with SMTP id m20csp3982237imm; Tue, 8 May 2018 00:27:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzWb92b5MB/95oUQl05zCiIUZkDuuXXfkuo1TVHqPF/YuPiVZIRCmc9ysWsVjeT9bn8SZr X-Received: by 10.98.9.145 with SMTP id 17mr39234201pfj.34.1525764427715; Tue, 08 May 2018 00:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525764427; cv=none; d=google.com; s=arc-20160816; b=GTi97UsoXb7BtM3iZDOojq6oVzvhatehFwNOzli0fXK7VFTrRLFLSV2Fbk+l92WBau vmnkEpGMl7lN68XJ2kZa3LHD1NOpgbhCFVZjCTXUxRvuxJW5cdDgUAdTEi04nwSpMoGx HknBrfTVjILIS6/MOf3Wkog5hBsaHhpmaxwPNJeAZpIy8J6i4Ieni6uI+hW1GVw/G5tw 98eZKTVviP5FDQDgrCQtqiOYkh/SQmBJ9BrkEbspQKwp3+gx/S/rFcB6/qzzDtSqvl8d yNIsm/NO285/nCX7/0NWavZ0PnZXdusGwzRFc42xGzuA/bcgsVOhWZ9lDfMB3FNOfy3E eYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1XpzkWQpvA0ftoVymZNOBVVDwDl/Jktzax3ZfN10jaY=; b=jMztkNjlC/K/k5aYYFv5xNvuYJbfv9Meq9ZzqT4IN//4YO4oQB/ztG+WbbWw2eXsJI Vrrb2fK/VdNiALW7A79z+hzWQdxg03pa9iDp3C8u4TksTGy36edVbI6uhYT9C2Z2tBsE RuR2lH8yQvWxCO0jrO0+oFKdPQIMcjTJ+QLtASqcRDsDd2svTuG3zKcZPbXtG4It9O1D eYY00ji+2rfLLHiMufLmgf3GvihqcX2jo76q6eHZ5uynLevdQl9T5nj8Vgg1dzcQP43Y ysEPXSAQQO0wFXSxQBJ/0i8yDu8YkruNkodJGNBIqZKh0KEuoPWcBQ5E8VI+BnYEFoZb MfLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oBVWWRxj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14-v6si1929541plp.31.2018.05.08.00.26.53; Tue, 08 May 2018 00:27:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oBVWWRxj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754593AbeEHHZh (ORCPT + 99 others); Tue, 8 May 2018 03:25:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:52322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753419AbeEHHZf (ORCPT ); Tue, 8 May 2018 03:25:35 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B8813217B4; Tue, 8 May 2018 07:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525764335; bh=pG6Sdt2j1oaWsi/he3xFm2VBAk/Ur0zR+sCuWWvY69M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oBVWWRxjM0JAUpjkH1zTrDUuvrbldSkU1DMD2a7GI61Rh6AhIRlUlFVL8Aol003ee AAIZHlbryZ6rAeHvpF+/sqk68eHhW4tSo6z2z4lKW2u/Kc91jS+2OShVyg+3uSL396 eGUAqjRssAcocFQwv7dqs4sE5iFdyCxH/rcHedXY= Date: Tue, 8 May 2018 09:25:22 +0200 From: Greg Kroah-Hartman To: Geert Uytterhoeven Cc: Michael Schmitz , Finn Thain , Linux/m68k , Linux Kernel Development Subject: Re: [PATCH] nubus: Unconditionally register bus type Message-ID: <20180508072522.GA26568@kroah.com> References: <5aee5ed3.1c69fb81.19d98.ef06SMTPIN_ADDED_MISSING@mx.google.com> <20180506045530.GA5328@kroah.com> <20180506202018.GC8924@kroah.com> <20180508070037.GA4792@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 08, 2018 at 09:07:27AM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Tue, May 8, 2018 at 9:00 AM, Greg Kroah-Hartman > wrote: > > On Mon, May 07, 2018 at 09:51:12AM +1200, Michael Schmitz wrote: > >> the BUG() was triggered by loading a Mac Nubus network card module on > >> a multiplatform kernel running on an Amiga machine. Up to Finn's Nubus > >> core rewrite (this February), we've seen no errors. Since then, Nubus > >> drivers fail to register because the Nubus bus is only registered on > >> Macs. > >> > >> Can't see link order involved here at all. > > > > The link order is totally involved here :) > > > > Link order determines the order in which init calls are run, so you need > > to ensure that your bus code comes before any drivers that use that bus > > code in link order. That way, at init time, your bus is created first, > > preventing this type of error to happen. > > The issue here is not due to link ordering, but due to the bus not being > registered on a system that doesn't have that particular bus. But how can that happen if the bus code is not present in the system at that point in time? Hardware doesn't matter at all here. > Akin to booting a kernel on an old PC without PCI, and loading a driver > module for a PCI network card. I guess that doesn't crash (because no one > has a PC without PCI anymore? ;-) No, it should work just fine, try it! :) The driver will not bind to anything, but the bus code should work properly, as long as it is initialized before the driver tries to register with that specific bus type. thanks, greg k-h