* [PATCH] Export functions from pcie-designware
@ 2014-08-30 12:24 matwey
2014-08-30 13:07 ` Fabio Estevam
0 siblings, 1 reply; 8+ messages in thread
From: matwey @ 2014-08-30 12:24 UTC (permalink / raw)
To: mohit.kumar, jg1.han
Cc: linux-pci, linux-kernel, matwey.kornilov, Matwey V. Kornilov
From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
pcie-spear13xx when built as module requires the functions from pcie-designware.
Export them properly.
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
drivers/pci/host/pcie-designware.c | 7 +++++++
drivers/pci/host/pcie-designware.h | 14 +++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 52bd3a1..7914b92c 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -89,6 +89,7 @@ int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val)
return PCIBIOS_SUCCESSFUL;
}
+EXPORT_SYMBOL(dw_pcie_cfg_read);
int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val)
{
@@ -103,6 +104,7 @@ int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val)
return PCIBIOS_SUCCESSFUL;
}
+EXPORT_SYMBOL(dw_pcie_cfg_write);
static inline void dw_pcie_readl_rc(struct pcie_port *pp, u32 reg, u32 *val)
{
@@ -183,6 +185,7 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
return ret;
}
+EXPORT_SYMBOL(dw_handle_msi_irq);
void dw_pcie_msi_init(struct pcie_port *pp)
{
@@ -193,6 +196,7 @@ void dw_pcie_msi_init(struct pcie_port *pp)
virt_to_phys((void *)pp->msi_data));
dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_HI, 4, 0);
}
+EXPORT_SYMBOL(dw_pcie_msi_init);
static int find_valid_pos0(struct pcie_port *pp, int msgvec, int pos, int *pos0)
{
@@ -401,6 +405,7 @@ int dw_pcie_link_up(struct pcie_port *pp)
else
return 0;
}
+EXPORT_SYMBOL(dw_pcie_link_up);
static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
irq_hw_number_t hwirq)
@@ -565,6 +570,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
return 0;
}
+EXPORT_SYMBOL(dw_pcie_host_init);
static void dw_pcie_prog_viewport_cfg0(struct pcie_port *pp, u32 busdev)
{
@@ -899,6 +905,7 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
PCI_COMMAND_MASTER | PCI_COMMAND_SERR;
dw_pcie_writel_rc(pp, val, PCI_COMMAND);
}
+EXPORT_SYMBOL(dw_pcie_setup_rc);
MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>");
MODULE_DESCRIPTION("Designware PCIe host controller driver");
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
index daf81f9..6e4400b 100644
--- a/drivers/pci/host/pcie-designware.h
+++ b/drivers/pci/host/pcie-designware.h
@@ -76,12 +76,12 @@ struct pcie_host_ops {
u32 (*get_msi_data)(struct pcie_port *pp);
};
-int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
-int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
-irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
-void dw_pcie_msi_init(struct pcie_port *pp);
-int dw_pcie_link_up(struct pcie_port *pp);
-void dw_pcie_setup_rc(struct pcie_port *pp);
-int dw_pcie_host_init(struct pcie_port *pp);
+extern int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
+extern int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
+extern irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
+extern void dw_pcie_msi_init(struct pcie_port *pp);
+extern int dw_pcie_link_up(struct pcie_port *pp);
+extern void dw_pcie_setup_rc(struct pcie_port *pp);
+extern int dw_pcie_host_init(struct pcie_port *pp);
#endif /* _PCIE_DESIGNWARE_H */
--
1.8.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Export functions from pcie-designware
2014-08-30 12:24 [PATCH] Export functions from pcie-designware matwey
@ 2014-08-30 13:07 ` Fabio Estevam
2014-09-01 13:25 ` Matwey V. Kornilov
2014-09-16 23:38 ` Bjorn Helgaas
0 siblings, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2014-08-30 13:07 UTC (permalink / raw)
To: matwey; +Cc: Mohit Kumar, Jingoo Han, linux-pci, linux-kernel, matwey.kornilov
On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
> From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
>
> pcie-spear13xx when built as module requires the functions from pcie-designware.
> Export them properly.
>
> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
> ---
> drivers/pci/host/pcie-designware.c | 7 +++++++
> drivers/pci/host/pcie-designware.h | 14 +++++++-------
> 2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 52bd3a1..7914b92c 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -89,6 +89,7 @@ int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val)
>
> return PCIBIOS_SUCCESSFUL;
> }
> +EXPORT_SYMBOL(dw_pcie_cfg_read);
What about using EXPORT_SYMBOL_GPL instead?
> -int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> -int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
> -irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
> -void dw_pcie_msi_init(struct pcie_port *pp);
> -int dw_pcie_link_up(struct pcie_port *pp);
> -void dw_pcie_setup_rc(struct pcie_port *pp);
> -int dw_pcie_host_init(struct pcie_port *pp);
> +extern int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> +extern int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
> +extern irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
> +extern void dw_pcie_msi_init(struct pcie_port *pp);
> +extern int dw_pcie_link_up(struct pcie_port *pp);
> +extern void dw_pcie_setup_rc(struct pcie_port *pp);
> +extern int dw_pcie_host_init(struct pcie_port *pp);
Why is this needed?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Export functions from pcie-designware
2014-08-30 13:07 ` Fabio Estevam
@ 2014-09-01 13:25 ` Matwey V. Kornilov
2014-09-16 23:38 ` Bjorn Helgaas
1 sibling, 0 replies; 8+ messages in thread
From: Matwey V. Kornilov @ 2014-09-01 13:25 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Mohit Kumar, Jingoo Han, linux-pci, linux-kernel
2014-08-30 17:07 GMT+04:00 Fabio Estevam <festevam@gmail.com>:
> On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
>> +EXPORT_SYMBOL(dw_pcie_cfg_read);
>
> What about using EXPORT_SYMBOL_GPL instead?
It is for initial author to decide whether he want to export this
function only for GPLed.
> Why is this needed?
For style consistency, I believe.
--
With best regards,
Matwey V. Kornilov.
Sternberg Astronomical Institute, Lomonosov Moscow State University, Russia
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Export functions from pcie-designware
2014-08-30 13:07 ` Fabio Estevam
2014-09-01 13:25 ` Matwey V. Kornilov
@ 2014-09-16 23:38 ` Bjorn Helgaas
2014-09-17 4:54 ` Mohit KUMAR DCG
1 sibling, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2014-09-16 23:38 UTC (permalink / raw)
To: Fabio Estevam
Cc: matwey, Mohit Kumar, Jingoo Han, linux-pci, linux-kernel,
matwey.kornilov
On Sat, Aug 30, 2014 at 10:07:30AM -0300, Fabio Estevam wrote:
> On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
> > From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
> >
> > pcie-spear13xx when built as module requires the functions from pcie-designware.
> > Export them properly.
I don't know how valuable pcie-spear13xx as a module is. No other host
drivers are supported as a module. Maybe we should just change
pcie-spear13xx from tristate to bool?
> >
> > Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
> > ---
> > drivers/pci/host/pcie-designware.c | 7 +++++++
> > drivers/pci/host/pcie-designware.h | 14 +++++++-------
> > 2 files changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> > index 52bd3a1..7914b92c 100644
> > --- a/drivers/pci/host/pcie-designware.c
> > +++ b/drivers/pci/host/pcie-designware.c
> > @@ -89,6 +89,7 @@ int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val)
> >
> > return PCIBIOS_SUCCESSFUL;
> > }
> > +EXPORT_SYMBOL(dw_pcie_cfg_read);
>
> What about using EXPORT_SYMBOL_GPL instead?
>
> > -int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> > -int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
> > -irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
> > -void dw_pcie_msi_init(struct pcie_port *pp);
> > -int dw_pcie_link_up(struct pcie_port *pp);
> > -void dw_pcie_setup_rc(struct pcie_port *pp);
> > -int dw_pcie_host_init(struct pcie_port *pp);
> > +extern int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> > +extern int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
> > +extern irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
> > +extern void dw_pcie_msi_init(struct pcie_port *pp);
> > +extern int dw_pcie_link_up(struct pcie_port *pp);
> > +extern void dw_pcie_setup_rc(struct pcie_port *pp);
> > +extern int dw_pcie_host_init(struct pcie_port *pp);
>
> Why is this needed?
- This is logically separate from the EXPORT_SYMBOL change, so it should be
a separate patch.
- I wouldn't take a patch adding "extern" to function declarations in a
header file because I recently removed them all, e.g.,
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f39d5b72913e.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Export functions from pcie-designware
2014-09-16 23:38 ` Bjorn Helgaas
@ 2014-09-17 4:54 ` Mohit KUMAR DCG
2014-09-17 5:11 ` Bjorn Helgaas
0 siblings, 1 reply; 8+ messages in thread
From: Mohit KUMAR DCG @ 2014-09-17 4:54 UTC (permalink / raw)
To: Bjorn Helgaas, Fabio Estevam
Cc: matwey, Jingoo Han, linux-pci, linux-kernel, matwey.kornilov
Hello Bjorn,
> -----Original Message-----
> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> Sent: Wednesday, September 17, 2014 5:09 AM
> To: Fabio Estevam
> Cc: matwey@sai.msu.ru; Mohit KUMAR DCG; Jingoo Han; linux-
> pci@vger.kernel.org; linux-kernel; matwey.kornilov@gmail.com
> Subject: Re: [PATCH] Export functions from pcie-designware
>
> On Sat, Aug 30, 2014 at 10:07:30AM -0300, Fabio Estevam wrote:
> > On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
> > > From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
> > >
> > > pcie-spear13xx when built as module requires the functions from pcie-
> designware.
> > > Export them properly.
>
> I don't know how valuable pcie-spear13xx as a module is. No other host
> drivers are supported as a module. Maybe we should just change pcie-
> spear13xx from tristate to bool?
>
- Sachin's patch is already doing this:
http://www.spinics.net/lists/linux-pci/msg33665.html
You acknowledge it to apply for v3.17 but somehow it has been left out.
Regards
Mohit
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Export functions from pcie-designware
2014-09-17 4:54 ` Mohit KUMAR DCG
@ 2014-09-17 5:11 ` Bjorn Helgaas
2014-09-19 5:15 ` Bjorn Helgaas
0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2014-09-17 5:11 UTC (permalink / raw)
To: Mohit KUMAR DCG
Cc: Fabio Estevam, matwey, Jingoo Han, linux-pci, linux-kernel,
matwey.kornilov
On Tue, Sep 16, 2014 at 9:54 PM, Mohit KUMAR DCG <Mohit.KUMAR@st.com> wrote:
> Hello Bjorn,
>
>> -----Original Message-----
>> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
>> Sent: Wednesday, September 17, 2014 5:09 AM
>> To: Fabio Estevam
>> Cc: matwey@sai.msu.ru; Mohit KUMAR DCG; Jingoo Han; linux-
>> pci@vger.kernel.org; linux-kernel; matwey.kornilov@gmail.com
>> Subject: Re: [PATCH] Export functions from pcie-designware
>>
>> On Sat, Aug 30, 2014 at 10:07:30AM -0300, Fabio Estevam wrote:
>> > On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
>> > > From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
>> > >
>> > > pcie-spear13xx when built as module requires the functions from pcie-
>> designware.
>> > > Export them properly.
>>
>> I don't know how valuable pcie-spear13xx as a module is. No other host
>> drivers are supported as a module. Maybe we should just change pcie-
>> spear13xx from tristate to bool?
>>
> - Sachin's patch is already doing this:
> http://www.spinics.net/lists/linux-pci/msg33665.html
>
> You acknowledge it to apply for v3.17 but somehow it has been left out.
Oops, sorry! I was pretty sure I remembered a patch like this, but
somehow I deleted the branch before it got fully merged. Anyway, I
re-did it. Thanks for the reminder.
Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Export functions from pcie-designware
2014-09-17 5:11 ` Bjorn Helgaas
@ 2014-09-19 5:15 ` Bjorn Helgaas
2014-09-24 4:33 ` Mohit KUMAR DCG
0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2014-09-19 5:15 UTC (permalink / raw)
To: Mohit KUMAR DCG
Cc: Fabio Estevam, matwey, Jingoo Han, linux-pci, linux-kernel,
matwey.kornilov
On Tue, Sep 16, 2014 at 10:11:22PM -0700, Bjorn Helgaas wrote:
> On Tue, Sep 16, 2014 at 9:54 PM, Mohit KUMAR DCG <Mohit.KUMAR@st.com> wrote:
> > Hello Bjorn,
> >
> >> -----Original Message-----
> >> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> >> Sent: Wednesday, September 17, 2014 5:09 AM
> >> To: Fabio Estevam
> >> Cc: matwey@sai.msu.ru; Mohit KUMAR DCG; Jingoo Han; linux-
> >> pci@vger.kernel.org; linux-kernel; matwey.kornilov@gmail.com
> >> Subject: Re: [PATCH] Export functions from pcie-designware
> >>
> >> On Sat, Aug 30, 2014 at 10:07:30AM -0300, Fabio Estevam wrote:
> >> > On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
> >> > > From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
> >> > >
> >> > > pcie-spear13xx when built as module requires the functions from pcie-
> >> designware.
> >> > > Export them properly.
> >>
> >> I don't know how valuable pcie-spear13xx as a module is. No other host
> >> drivers are supported as a module. Maybe we should just change pcie-
> >> spear13xx from tristate to bool?
> >>
> > - Sachin's patch is already doing this:
> > http://www.spinics.net/lists/linux-pci/msg33665.html
> >
> > You acknowledge it to apply for v3.17 but somehow it has been left out.
>
> Oops, sorry! I was pretty sure I remembered a patch like this, but
> somehow I deleted the branch before it got fully merged. Anyway, I
> re-did it. Thanks for the reminder.
Actually, I *had* already merged it, and it's been in Linus' tree since
2014-09-03 15:45:48 (GMT) and appeared in v3.17-rc4:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/pci/host/Kconfig?id=f16c15a0e0ea
Or am I still missing something?
Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Export functions from pcie-designware
2014-09-19 5:15 ` Bjorn Helgaas
@ 2014-09-24 4:33 ` Mohit KUMAR DCG
0 siblings, 0 replies; 8+ messages in thread
From: Mohit KUMAR DCG @ 2014-09-24 4:33 UTC (permalink / raw)
To: Bjorn Helgaas, Fabio Estevam
Cc: Fabio Estevam, matwey, Jingoo Han, linux-pci, linux-kernel,
matwey.kornilov
Hello Bjorn,
> -----Original Message-----
> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> Sent: Friday, September 19, 2014 10:46 AM
> To: Mohit KUMAR DCG
> Cc: Fabio Estevam; matwey@sai.msu.ru; Jingoo Han; linux-
> pci@vger.kernel.org; linux-kernel; matwey.kornilov@gmail.com
> Subject: Re: [PATCH] Export functions from pcie-designware
>
> On Tue, Sep 16, 2014 at 10:11:22PM -0700, Bjorn Helgaas wrote:
> > On Tue, Sep 16, 2014 at 9:54 PM, Mohit KUMAR DCG
> <Mohit.KUMAR@st.com> wrote:
> > > Hello Bjorn,
> > >
> > >> -----Original Message-----
> > >> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> > >> Sent: Wednesday, September 17, 2014 5:09 AM
> > >> To: Fabio Estevam
> > >> Cc: matwey@sai.msu.ru; Mohit KUMAR DCG; Jingoo Han; linux-
> > >> pci@vger.kernel.org; linux-kernel; matwey.kornilov@gmail.com
> > >> Subject: Re: [PATCH] Export functions from pcie-designware
> > >>
> > >> On Sat, Aug 30, 2014 at 10:07:30AM -0300, Fabio Estevam wrote:
> > >> > On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
> > >> > > From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
> > >> > >
> > >> > > pcie-spear13xx when built as module requires the functions from
> > >> > > pcie-
> > >> designware.
> > >> > > Export them properly.
> > >>
> > >> I don't know how valuable pcie-spear13xx as a module is. No other
> > >> host drivers are supported as a module. Maybe we should just
> > >> change pcie- spear13xx from tristate to bool?
> > >>
> > > - Sachin's patch is already doing this:
> > > http://www.spinics.net/lists/linux-pci/msg33665.html
> > >
> > > You acknowledge it to apply for v3.17 but somehow it has been left out.
> >
> > Oops, sorry! I was pretty sure I remembered a patch like this, but
> > somehow I deleted the branch before it got fully merged. Anyway, I
> > re-did it. Thanks for the reminder.
>
> Actually, I *had* already merged it, and it's been in Linus' tree since
> 2014-09-03 15:45:48 (GMT) and appeared in v3.17-rc4:
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers
> /pci/host/Kconfig?id=f16c15a0e0ea
>
- yes, its been merged. I think Fabio was working with v3.17-rc2 or earlier.
Fabio,
Pls let us know if you still have any concern after merging of this patch.
Thanks
Mohit
> Or am I still missing something?
>
> Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-09-24 4:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-30 12:24 [PATCH] Export functions from pcie-designware matwey
2014-08-30 13:07 ` Fabio Estevam
2014-09-01 13:25 ` Matwey V. Kornilov
2014-09-16 23:38 ` Bjorn Helgaas
2014-09-17 4:54 ` Mohit KUMAR DCG
2014-09-17 5:11 ` Bjorn Helgaas
2014-09-19 5:15 ` Bjorn Helgaas
2014-09-24 4:33 ` Mohit KUMAR DCG
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.