* [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
@ 2007-11-22 17:35 Jochen Friedrich
2007-11-25 15:38 ` Timur Tabi
0 siblings, 1 reply; 7+ messages in thread
From: Jochen Friedrich @ 2007-11-22 17:35 UTC (permalink / raw)
To: linuxppc-dev
fs_enet and cpm_uart need symbols from commproc.c (for CPM1) or
cpm2_common.c. Add EXPORT_SYMBOL_GPL for cpmp, cpm_setbrg and cpm2_immr,
so the drivers can be compiled as modules.
Building modules, stage 2.
MODPOST 5 modules
ERROR: "cpm2_immr" [drivers/net/fs_enet/fs_enet.ko] undefined!
ERROR: "cpmp" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/sysdev/commproc.c | 3 +++
arch/powerpc/sysdev/cpm2_common.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index f6a6378..ddbe138 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -51,6 +51,8 @@ static void m8xx_cpm_dpinit(void);
static uint host_buffer; /* One page of host buffer */
static uint host_end; /* end + 1 */
cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */
+EXPORT_SYMBOL_GPL(cpmp);
+
immap_t __iomem *mpc8xx_immr;
static cpic8xx_t __iomem *cpic_reg;
@@ -302,6 +304,7 @@ cpm_setbrg(uint brg, uint rate)
out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
CPM_BRG_EN | CPM_BRG_DIV16);
}
+EXPORT_SYMBOL_GPL(cpm_setbrg);
#ifndef CONFIG_PPC_CPM_NEW_BINDING
/*
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c
index 859362f..b878a67 100644
--- a/arch/powerpc/sysdev/cpm2_common.c
+++ b/arch/powerpc/sysdev/cpm2_common.c
@@ -51,11 +51,13 @@ static void cpm2_dpinit(void);
#endif
cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor space */
+EXPORT_SYMBOL_GPL(cpmp);
/* We allocate this here because it is used almost exclusively for
* the communication processor devices.
*/
cpm2_map_t __iomem *cpm2_immr;
+EXPORT_SYMBOL_GPL(cpm2_immr);
#define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amount
of space for CPM as it is larger
@@ -117,6 +119,7 @@ cpm_setbrg(uint brg, uint rate)
cpm2_unmap(bp);
}
+EXPORT_SYMBOL_GPL(cpm_setbrg);
/* This function is used to set high speed synchronous baud rate
* clocks.
--
1.5.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
2007-11-22 17:35 [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart Jochen Friedrich
@ 2007-11-25 15:38 ` Timur Tabi
2007-11-25 15:58 ` Jon Smirl
2007-11-25 16:18 ` Vitaly Bordug
0 siblings, 2 replies; 7+ messages in thread
From: Timur Tabi @ 2007-11-25 15:38 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: linuxppc-dev
Jochen Friedrich wrote:
> fs_enet and cpm_uart need symbols from commproc.c (for CPM1) or
> cpm2_common.c. Add EXPORT_SYMBOL_GPL for cpmp, cpm_setbrg and cpm2_immr,
> so the drivers can be compiled as modules.
Maybe this is a stupid question, but why did you choose EXPORT_SYMBOL_GPL and
not EXPORT_SYMBOL?
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
2007-11-25 15:38 ` Timur Tabi
@ 2007-11-25 15:58 ` Jon Smirl
2007-11-25 16:18 ` Vitaly Bordug
1 sibling, 0 replies; 7+ messages in thread
From: Jon Smirl @ 2007-11-25 15:58 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
On 11/25/07, Timur Tabi <timur@freescale.com> wrote:
> Jochen Friedrich wrote:
> > fs_enet and cpm_uart need symbols from commproc.c (for CPM1) or
> > cpm2_common.c. Add EXPORT_SYMBOL_GPL for cpmp, cpm_setbrg and cpm2_immr,
> > so the drivers can be compiled as modules.
>
> Maybe this is a stupid question, but why did you choose EXPORT_SYMBOL_GPL and
> not EXPORT_SYMBOL?
By marking all new exports EXPORT_SYMBOL_GPL it stops new closed
source device drivers from being built. We have to live the the
existing ones, but we certainly don't want to encourage any more to be
built.
Over on lkml there is a thread about moving all symbols of this type
into private name spaces and removing the exports in the final kernel
binary.
>
> --
> Timur Tabi
> Linux Kernel Developer @ Freescale
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
2007-11-25 15:38 ` Timur Tabi
2007-11-25 15:58 ` Jon Smirl
@ 2007-11-25 16:18 ` Vitaly Bordug
2007-11-25 21:02 ` Dan Malek
2007-11-26 11:15 ` Jochen Friedrich
1 sibling, 2 replies; 7+ messages in thread
From: Vitaly Bordug @ 2007-11-25 16:18 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
On Sun, 25 Nov 2007 09:38:57 -0600
Timur Tabi wrote:
> Jochen Friedrich wrote:
> > fs_enet and cpm_uart need symbols from commproc.c (for CPM1) or
> > cpm2_common.c. Add EXPORT_SYMBOL_GPL for cpmp, cpm_setbrg and
> > cpm2_immr, so the drivers can be compiled as modules.
As I told replying to prev mail, this needs to be addressed in respective driver(s), since
there is a way to retrieve such pointers without making them global.
This patch will exist in maillist as a workaround, but meanwhile I'll take a look at this problem.
>
> Maybe this is a stupid question, but why did you choose
> EXPORT_SYMBOL_GPL and not EXPORT_SYMBOL?
>
To prevent using those pointers from within non-GPL modules. kind of policy now...
--
Sincerely, Vitaly
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
2007-11-25 16:18 ` Vitaly Bordug
@ 2007-11-25 21:02 ` Dan Malek
2007-11-26 10:28 ` Vitaly Bordug
2007-11-26 11:15 ` Jochen Friedrich
1 sibling, 1 reply; 7+ messages in thread
From: Dan Malek @ 2007-11-25 21:02 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Timur Tabi
On Nov 25, 2007, at 8:18 AM, Vitaly Bordug wrote:
> To prevent using those pointers from within non-GPL modules. kind
> of policy now...
As the original copyright holder of nearly all of this of
this code, I do not wish this be done.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
2007-11-25 21:02 ` Dan Malek
@ 2007-11-26 10:28 ` Vitaly Bordug
0 siblings, 0 replies; 7+ messages in thread
From: Vitaly Bordug @ 2007-11-26 10:28 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-dev, Timur Tabi
On Sun, 25 Nov 2007 13:02:03 -0800
Dan Malek wrote:
>
> On Nov 25, 2007, at 8:18 AM, Vitaly Bordug wrote:
>
> > To prevent using those pointers from within non-GPL modules. kind
> > of policy now...
>
> As the original copyright holder of nearly all of this of
> this code, I do not wish this be done.
In this particular case this is not going to happen anyway, but I will take your opinion into
account for the similar cases.
--
Sincerely, Vitaly
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart
2007-11-25 16:18 ` Vitaly Bordug
2007-11-25 21:02 ` Dan Malek
@ 2007-11-26 11:15 ` Jochen Friedrich
1 sibling, 0 replies; 7+ messages in thread
From: Jochen Friedrich @ 2007-11-26 11:15 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Timur Tabi
Hi Vitaly,
>> Maybe this is a stupid question, but why did you choose
>> EXPORT_SYMBOL_GPL and not EXPORT_SYMBOL?
>>
> To prevent using those pointers from within non-GPL modules. kind of policy now...
In particular in this case, as these pointers are currently not exported, at all. They
are currently used by a few drivers and will disappear again once these drivers have
been converted to use the propper accessors, which will also prevent access conflicts
to the CPM registers.
Thanks,
Jochen
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-11-26 11:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 17:35 [PATCH revised 3/4] powerpc: Add EXPORT_SYMBOL_GPL for symbols required by fs_enet and cpm_uart Jochen Friedrich
2007-11-25 15:38 ` Timur Tabi
2007-11-25 15:58 ` Jon Smirl
2007-11-25 16:18 ` Vitaly Bordug
2007-11-25 21:02 ` Dan Malek
2007-11-26 10:28 ` Vitaly Bordug
2007-11-26 11:15 ` Jochen Friedrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).