[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EE11001F9E5DDD47B7634E2F8A612F2E162436BC@lhreml503-mbs>
Date: Wed, 14 Oct 2015 09:56:09 +0000
From: Gabriele Paoloni <gabriele.paoloni@...wei.com>
To: Arnd Bergmann <arnd@...db.de>
CC: "Wangzhou (B)" <wangzhou1@...ilicon.com>,
Bjorn Helgaas <helgaas@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"jingoohan1@...il.com" <jingoohan1@...il.com>,
"pratyush.anand@...il.com" <pratyush.anand@...il.com>,
"linux@....linux.org.uk" <linux@....linux.org.uk>,
"thomas.petazzoni@...e-electrons.com"
<thomas.petazzoni@...e-electrons.com>,
"lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
"james.morse@....com" <james.morse@....com>,
"Liviu.Dudau@....com" <Liviu.Dudau@....com>,
"jason@...edaemon.net" <jason@...edaemon.net>,
"robh@...nel.org" <robh@...nel.org>,
"gabriel.fernandez@...aro.org" <gabriel.fernandez@...aro.org>,
"Minghuan.Lian@...escale.com" <Minghuan.Lian@...escale.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
zhangjukuo <zhangjukuo@...we.i.com>,
qiuzhenfa <qiuzhenfa@...ilicon.com>,
"liudongdong (C)" <liudongdong3@...wei.com>,
qiujiang <qiujiang@...wei.com>,
"xuwei (O)" <xuwei5@...ilicon.com>,
"Liguozhu (Kenneth)" <liguozhu@...ilicon.com>,
"Wangkefeng (Kevin)" <wangkefeng.wang@...wei.com>,
Rob Herring <robh+dt@...nel.org>
Subject: RE: [PATCH v10 4/6] PCI: hisi: Add PCIe host support for HiSilicon
SoC Hip05
> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@...db.de]
> Sent: Wednesday, October 14, 2015 10:42 AM
> To: Gabriele Paoloni
> Cc: Wangzhou (B); Bjorn Helgaas; Bjorn Helgaas; jingoohan1@...il.com;
> pratyush.anand@...il.com; linux@....linux.org.uk;
> thomas.petazzoni@...e-electrons.com; lorenzo.pieralisi@....com;
> james.morse@....com; Liviu.Dudau@....com; jason@...edaemon.net;
> robh@...nel.org; gabriel.fernandez@...aro.org;
> Minghuan.Lian@...escale.com; linux-pci@...r.kernel.org; linux-arm-
> kernel@...ts.infradead.org; devicetree@...r.kernel.org; linux-
> kernel@...r.kernel.org; zhangjukuo; qiuzhenfa; liudongdong (C);
> qiujiang; xuwei (O); Liguozhu (Kenneth); Wangkefeng (Kevin); Rob
> Herring
> Subject: Re: [PATCH v10 4/6] PCI: hisi: Add PCIe host support for
> HiSilicon SoC Hip05
>
> On Wednesday 14 October 2015 09:31:48 Gabriele Paoloni wrote:
> > >
> > > > To me it sounds more appropriate to adopt subsys_initcall() for
> all
> > > the
> > > > PCI Host Bridge controllers rather than having them as loadable
> > > modules...
> > > >
> > > > What is your view?
> > >
> > > subsys_initcall() sounds odd because it's a driver rather than a
> > > subsystem,
> > > but I realize that most of the other levels don't fit any better.
> >
> > Yes well I was seeing for example the vgaarb
> > http://lxr.free-electrons.com/source/drivers/gpu/vga/vgaarb.c#L1357
> >
> > That in the init is calling pci_get_subsys()
> >
> > So I was wondering that the PCI devices may not be registered unless
> > we also init the PCI host bridge through subsys_initcall()...
>
> I think this should work as is: the code first looks for devices
> that are already there and then registers a notifier for devices
> that show up later. This is meant to work for both devices that
> are hotplugged at a later point as well as PCI buses that are
> already there but not yet probed.
>
> > But then maybe is the vgaarb to be buggy...
>
> Possible. It may well be that the code is only tested on x86,
> which always probes its PCI very early.
>
> > > As I said, it's not really a choice we have to make in the source
> code,
> > > we can use subsys_initcall together with module_exit(), or we can
> > > create a helper macro that is similar to module_platform_driver()
> > > specifically for PCI that uses a particular initcall level.
> >
> > Ok got it. But I guess this needs to be thought and applied to all
> > the PCI host bridge controllers...
> >
> > So maybe for this driver I can use module_platform_driver_probe()
> > and then we can see...
>
> Sounds good. Let's focus on getting the driver merged first and
> then follow up with a patch to get this right for all PCI hosts.
Ok good let's do like this then
will change in v11
Again Many Thanks
Gab
>
> Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists