linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: non-GPL export for eeh_dev_check_failure
@ 2014-08-05 14:35 Vishal Mansur
  0 siblings, 0 replies; 5+ messages in thread
From: Vishal Mansur @ 2014-08-05 14:35 UTC (permalink / raw)
  To: shangw, benh, linuxppc-dev; +Cc: linux-kernel

EEH kernel services are inconsistently exported by the 
kernel. eeh_check_failure is exported for any use, but 
eeh_dev_check_failure is exported only for GPL use. 
While eeh_check_failure is implemented for a specific 
purpose to be used by services such as readl, it is 
not suited for a purpose where caller needs eeh status. 
This functionality is provided by eeh_dev_check_failure.

This patch relaxes the export for eeh_dev_check_failure
to make it consistent with eeh_check_failure() and 
usable by non-GPL modules.

Signed-off-by: Vishal Mansur <vmansur@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 86e2570..8689c30 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -496,8 +496,7 @@ dn_unlock:
        eeh_serialize_unlock(flags);
        return rc;
 }
-
-EXPORT_SYMBOL_GPL(eeh_dev_check_failure);
+EXPORT_SYMBOL(eeh_dev_check_failure);

 /**
  * eeh_check_failure - Check if all 1's data is due to EEH slot freeze
--
2.0.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] powerpc: non-GPL export for eeh_dev_check_failure
@ 2014-08-05 14:42 Vishal Mansur
  2014-08-05 14:51 ` One Thousand Gnomes
  0 siblings, 1 reply; 5+ messages in thread
From: Vishal Mansur @ 2014-08-05 14:42 UTC (permalink / raw)
  To: gwshan, benh, linuxppc-dev; +Cc: linux-kernel

EEH kernel services are inconsistently exported by the 
kernel. eeh_check_failure is exported for any use, but 
eeh_dev_check_failure is exported only for GPL use. 
While eeh_check_failure is implemented for a specific 
purpose to be used by services such as readl, it is 
not suited for a purpose where caller needs eeh status. 
This functionality is provided by eeh_dev_check_failure.

This patch relaxes the export for eeh_dev_check_failure
to make it consistent with eeh_check_failure() and 
usable by non-GPL modules.

Signed-off-by: Vishal Mansur <vmansur@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 86e2570..8689c30 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -496,8 +496,7 @@ dn_unlock:
        eeh_serialize_unlock(flags);
        return rc;
 }
-
-EXPORT_SYMBOL_GPL(eeh_dev_check_failure);
+EXPORT_SYMBOL(eeh_dev_check_failure);

 /**
  * eeh_check_failure - Check if all 1's data is due to EEH slot freeze
--
2.0.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: non-GPL export for eeh_dev_check_failure
  2014-08-05 14:42 [PATCH] powerpc: non-GPL export for eeh_dev_check_failure Vishal Mansur
@ 2014-08-05 14:51 ` One Thousand Gnomes
  2014-08-11  3:16   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: One Thousand Gnomes @ 2014-08-05 14:51 UTC (permalink / raw)
  To: Vishal Mansur; +Cc: linuxppc-dev, gwshan, linux-kernel

On Tue, 05 Aug 2014 20:12:09 +0530
Vishal Mansur <vmansur@linux.vnet.ibm.com> wrote:

> EEH kernel services are inconsistently exported by the 
> kernel. eeh_check_failure is exported for any use, but 
> eeh_dev_check_failure is exported only for GPL use. 
> While eeh_check_failure is implemented for a specific 
> purpose to be used by services such as readl, it is 
> not suited for a purpose where caller needs eeh status. 
> This functionality is provided by eeh_dev_check_failure.
> 
> This patch relaxes the export for eeh_dev_check_failure
> to make it consistent with eeh_check_failure() and 
> usable by non-GPL modules.

The GPL covers all derivative works. Tweaking this doesn't magically
allow you to use the feature in non GPL code. Your legal department can I
am sure explain in detail further.

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: non-GPL export for eeh_dev_check_failure
  2014-08-05 14:51 ` One Thousand Gnomes
@ 2014-08-11  3:16   ` Benjamin Herrenschmidt
  2014-08-13  7:29     ` Vishal Mansur
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2014-08-11  3:16 UTC (permalink / raw)
  To: One Thousand Gnomes; +Cc: linuxppc-dev, Vishal Mansur, gwshan, linux-kernel

On Tue, 2014-08-05 at 15:51 +0100, One Thousand Gnomes wrote:
> On Tue, 05 Aug 2014 20:12:09 +0530
> Vishal Mansur <vmansur@linux.vnet.ibm.com> wrote:
> 
> > EEH kernel services are inconsistently exported by the 
> > kernel. eeh_check_failure is exported for any use, but 
> > eeh_dev_check_failure is exported only for GPL use. 
> > While eeh_check_failure is implemented for a specific 
> > purpose to be used by services such as readl, it is 
> > not suited for a purpose where caller needs eeh status. 
> > This functionality is provided by eeh_dev_check_failure.
> > 
> > This patch relaxes the export for eeh_dev_check_failure
> > to make it consistent with eeh_check_failure() and 
> > usable by non-GPL modules.
> 
> The GPL covers all derivative works. Tweaking this doesn't magically
> allow you to use the feature in non GPL code. Your legal department can I
> am sure explain in detail further.

This is an interesting case... I assume this has to do with a well known
GPU manufacturer...

The PCI APIs are generally exported in such a way that a non-GPL driver
can use them (regardless of whether one considers a non-GPL driver to be
legal here or not, this is besides the point).

eeh_dev_check_failure() can be considered as powerpc specific extension
of the PCI API for use by PCI drivers and as such, it *could* be
construed that we should be consistent (and consistent with
eeh_check_failure()) and expose it as an EXPORT_SYMBOL without the GPL
suffix.

So I'm somewhat tempted to take this patch, but Vishal, the driver in
question could, I suppose, as a workaround, use a readl to some scratch
register of some description, no ?

Cheers,
Ben.

> Alan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: non-GPL export for eeh_dev_check_failure
  2014-08-11  3:16   ` Benjamin Herrenschmidt
@ 2014-08-13  7:29     ` Vishal Mansur
  0 siblings, 0 replies; 5+ messages in thread
From: Vishal Mansur @ 2014-08-13  7:29 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, One Thousand Gnomes
  Cc: linuxppc-dev, gwshan, linux-kernel

On 8/11/2014 8:46 AM, Benjamin Herrenschmidt wrote:
> On Tue, 2014-08-05 at 15:51 +0100, One Thousand Gnomes wrote:
>> On Tue, 05 Aug 2014 20:12:09 +0530
>> Vishal Mansur <vmansur@linux.vnet.ibm.com> wrote:
>>
>>> EEH kernel services are inconsistently exported by the 
>>> kernel. eeh_check_failure is exported for any use, but 
>>> eeh_dev_check_failure is exported only for GPL use. 
>>> While eeh_check_failure is implemented for a specific 
>>> purpose to be used by services such as readl, it is 
>>> not suited for a purpose where caller needs eeh status. 
>>> This functionality is provided by eeh_dev_check_failure.
>>>
>>> This patch relaxes the export for eeh_dev_check_failure
>>> to make it consistent with eeh_check_failure() and 
>>> usable by non-GPL modules.
>>
>> The GPL covers all derivative works. Tweaking this doesn't magically
>> allow you to use the feature in non GPL code. Your legal department can I
>> am sure explain in detail further.
> 
> This is an interesting case... I assume this has to do with a well known
> GPU manufacturer...
> 
> The PCI APIs are generally exported in such a way that a non-GPL driver
> can use them (regardless of whether one considers a non-GPL driver to be
> legal here or not, this is besides the point).
> 
> eeh_dev_check_failure() can be considered as powerpc specific extension
> of the PCI API for use by PCI drivers and as such, it *could* be
> construed that we should be consistent (and consistent with
> eeh_check_failure()) and expose it as an EXPORT_SYMBOL without the GPL
> suffix.
> 
> So I'm somewhat tempted to take this patch, but Vishal, the driver in
> question could, I suppose, as a workaround, use a readl to some scratch
> register of some description, no ?

Ben, calling readl to some scratch register will be same as calling 
eeh_check_failure, caller will not be able to get eeh status.

Hence for the purpose where caller wants to know eeh status during
a bad register read, it can not be worked around using readl.

Thanks,
Vishal

> 
> Cheers,
> Ben.
> 
>> Alan
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-13  7:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 14:42 [PATCH] powerpc: non-GPL export for eeh_dev_check_failure Vishal Mansur
2014-08-05 14:51 ` One Thousand Gnomes
2014-08-11  3:16   ` Benjamin Herrenschmidt
2014-08-13  7:29     ` Vishal Mansur
  -- strict thread matches above, loose matches on Subject: below --
2014-08-05 14:35 Vishal Mansur

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).