Received: by 10.192.165.148 with SMTP id m20csp3989812imm; Tue, 8 May 2018 00:36:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrq79k75t4aAmPyypxScfrCNUwa3XmbJW7XLL65B8X8Bt/fhewXjiVoEysX3YoZc0SQRQgj X-Received: by 2002:a65:5c88:: with SMTP id a8-v6mr31299232pgt.373.1525765015571; Tue, 08 May 2018 00:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525765015; cv=none; d=google.com; s=arc-20160816; b=cG5DEfmXdi3ReEc6dJ7JKMGKgJ/B1yZ9olHz6VvDuYmNBFibTELD3eKJQZTqFWNm/k qHFISSGtdQk1q5QLK7TiDnv1kr86jSwZeSzOxjPJs1IywIsgVSBlq6EEgbluo2drit9O bNXRURMRvPv46w03khr8XlBq0v8reZ+qQjtlB4ayxeAJzgZsIJxcXIehmc2nU17Stwfp 3621t6mdlKLv0tIRrBjJCWeddc1HYv2lcu1Nda5YIBJr/+5rnYWHEVWh1imLtjMPU86u K4L2z5WejaY5tkVQ0j04ryHu3aqzgSK30J7gtHugLxDA25UjqmqA3xOXmWbY27lCnnCP s9mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Tqn/6XDMmOPmXqxw1tuj6Ivo/XnchCtdvWongIExG/o=; b=WgvEZLJLrId8I0XkIheyyK3TCsNbg1b0NRL63y7fsd/Ddf2AuH3E0Yh1/dv693cd88 boqAaX1KlcOiRiA3WkA9aInv+u0e5MWydLpTC5Qoz5t+EbjbhKlctSaVybFvUKbQap0o XvC2h2j0AiluT/pWw8gEgPmPvtMFP/sqmsG9GCZm/kwnFbsLTqttBBmR/c5p5DbHnCBm rb0XxC4grw3K/OVvNDF8OGa0ACioGI9NNgTc1J3GMXX/b73BHO3fksBWacsmCFwYMxBm lAlB5RiefQ+fxkJNJOWzhlz7DTj9TTfjLA6gd/r80UVgkpOjazn9sRCerGimzIw6TIu6 QbuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=TXmwmbhu; 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 b18-v6si19108601pgn.669.2018.05.08.00.36.41; Tue, 08 May 2018 00:36:55 -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=fail header.i=@gmail.com header.s=20161025 header.b=TXmwmbhu; 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 S1754730AbeEHHfQ (ORCPT + 99 others); Tue, 8 May 2018 03:35:16 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:36179 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754632AbeEHHfL (ORCPT ); Tue, 8 May 2018 03:35:11 -0400 Received: by mail-ua0-f195.google.com with SMTP id b25so13394797uak.3 for ; Tue, 08 May 2018 00:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Tqn/6XDMmOPmXqxw1tuj6Ivo/XnchCtdvWongIExG/o=; b=TXmwmbhuqmlsYcnfwkoUcN7TbukgtDf9zd3XQiGnUXPBhkQuI7OYPJC8px5sTpdK2H hb+PIS+RBBpEsC9H+JFBdjBkq5utVYrx2lvI77olTG4kCWBM8D8t6WK7k82Vp4d8MjdP yS4sZNGE9LGioZSMqxqlA+ZEqWBRA97Jw5tfyiJDuXrJpgG+wyNyxmXLRONM0oA7rqo3 a1/4ZcjHaq7zFvp/QwSadMos0BPANS7Z13LbHlQNufevMCQHxjUZxoSt9fRHLXou8AEy sncuIN+J8yVYvM7VfxK+TIgWDbg1r7SC6e/MUgFluRV+kLfXn62WeGwEqjmG719LmB/z 43fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Tqn/6XDMmOPmXqxw1tuj6Ivo/XnchCtdvWongIExG/o=; b=EQIz/2MMs8v2Q5XqItG+8qcszrwDGvAgqAEyDk5WOzeZj5Npkebz5rvghrptBK6VKe vJwQRlU5+s2QUPCUwERIqN52uDmJ2tJlf13hjRW8p1lmAYKJh3mchLh301jgki03is+c ShojNpgsO50ZUJFTd2pRs2sC1we8bOAyABAkvpQqBmeFaujw+ovh8zGTJEYn4F5l2Znm DrXlmOHuGYBjH7/YYYdCExtWFRguVLKU6MijV7FnX6xUylXS2G4wRV9QY1b6IW/ESKPc LXtLsFaaiTZsqliaqFTW/GIQEgtsDkDVUcM2C580WEF50CelpC3NHjbF2mel83jJrwSt nSsw== X-Gm-Message-State: ALQs6tAD5cRqmgTWeVuQMUiFJytuGg1ME34TGlMqDE34siGUbsmjZn8d y2IfenMwgNi3OQ4nC3Nin4UfEZqmb+R00bm/Z1g= X-Received: by 10.176.36.147 with SMTP id i19mr34102512uan.180.1525764910692; Tue, 08 May 2018 00:35:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.122.10 with HTTP; Tue, 8 May 2018 00:35:10 -0700 (PDT) In-Reply-To: <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> <20180508072522.GA26568@kroah.com> From: Geert Uytterhoeven Date: Tue, 8 May 2018 09:35:10 +0200 X-Google-Sender-Auth: Ue2ibHlufZuCh7L-aM12MOYuOOA Message-ID: Subject: Re: [PATCH] nubus: Unconditionally register bus type To: Greg Kroah-Hartman Cc: Michael Schmitz , Finn Thain , "Linux/m68k" , Linux Kernel Development Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Tue, May 8, 2018 at 9:25 AM, Greg Kroah-Hartman wrote: > On Tue, May 08, 2018 at 09:07:27AM +0200, Geert Uytterhoeven wrote: >> 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. The bus code is present in the system. The bus is just not registered by the NuBus bus driver if the hardware doesn't have a NuBus host. >> 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. Hence the NuBus bus code should register the bus irregardless of the presence of the NuBus host hardware. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds