[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo7_ev1oYptvBObK2dS9_LXkU2_W_OMD825POE6L5Yh7Lw@mail.gmail.com>
Date: Wed, 6 May 2015 08:29:14 -0500
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Gabriel Fernandez <gabriel.fernandez@...aro.org>
Cc: Gabriel FERNANDEZ <gabriel.fernandez@...com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Srinivas Kandagatla <srinivas.kandagatla@...il.com>,
Maxime Coquelin <maxime.coquelin@...com>,
Patrice Chotard <patrice.chotard@...com>,
Russell King <linux@....linux.org.uk>,
Jingoo Han <jg1.han@...sung.com>,
Lucas Stach <l.stach@...gutronix.de>,
Fabrice Gasnier <fabrice.gasnier@...com>,
Kishon Vijay Abraham I <kishon@...com>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Greg KH <gregkh@...uxfoundation.org>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Joe Perches <joe@...ches.com>, Tejun Heo <tj@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Viresh Kumar <viresh.kumar@...aro.org>,
Thierry Reding <treding@...dia.com>,
Phil Edworthy <phil.edworthy@...esas.com>,
Minghuan Lian <Minghuan.Lian@...escale.com>,
Tanmay Inamdar <tinamdar@....com>,
Muralidharan Karicheri <m-karicheri2@...com>,
Sachin Kamat <sachin.kamat@...sung.com>,
Andrew Lunn <andrew@...n.ch>,
Liviu Dudau <liviu.dudau@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"kernel@...inux.com" <kernel@...inux.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH v3 3/5] PCI: st: Provide support for the sti PCIe controller
On Wed, May 6, 2015 at 4:14 AM, Gabriel Fernandez
<gabriel.fernandez@...aro.org> wrote:
> Hi Bjorn,
>
> On 6 May 2015 at 00:16, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>> On Fri, Apr 10, 2015 at 11:12:46AM +0200, Gabriel FERNANDEZ wrote:
>>> sti pcie is built around a Synopsis Designware PCIe IP.
>>>
>>> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@...com>
>>> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@...aro.org>
>>
>>> +/* ST PCIe driver does not allow module unload */
>>
>> Is there something that prevents module unload, or is it just untested?
>>
> Yes we haven't tested
>
>>> +static int __init pcie_init(void)
>>> +{
>>> + return platform_driver_probe(&st_pcie_driver, st_pcie_probe);
>>> +}
>>> +device_initcall(pcie_init);
>>
>> Can you use module_platform_driver_probe() or module_init() here?
>>
>
> Yes we can use module_init() here.
>
> By the way if figure out i removed __init attribute on st_pcie_probe()
> in previous version to follow Arnd's remark.
> But st_pcie_probe calls hook_fault_code() that has __init attribute.
> So I think we need to keep __init for probe routine ?
> Also, we have to restrict bind/unbind with "suppress_bind_attrs" in
> platform_driver structure.
> This is the main reason to not allow module unload/reload.
I don't really care which solution you end up with here. But please
do take a look at how the other drivers solve the same problem. Using
"device_initcall()" is unique in drivers/pci/host, and I don't believe
the problem is unique. If several drivers have the same issue, they
should solve it the same way.
> If you are ok i will send a v4 ?
I think I'll have a few questions about the designware changes, too,
so you might want to wait a day or two.
>>> +MODULE_AUTHOR("Fabrice Gasnier <fabrice.gasnier@...com>");
>>> +MODULE_DESCRIPTION("PCI express Driver for ST SoCs");
>>> +MODULE_LICENSE("GPL v2");
>>> --
>>> 1.9.1
>>>
--
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