From: Vishal Mansur <hidden> Date: 2014-08-05 14:42:23
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 <redacted>
---
arch/powerpc/kernel/eeh.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: One Thousand Gnomes <hidden> Date: 2014-08-05 14:52:11
On Tue, 05 Aug 2014 20:12:09 +0530
Vishal Mansur [off-list ref] 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
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2014-08-11 03:17:09
On Tue, 2014-08-05 at 15:51 +0100, One Thousand Gnomes wrote:
On Tue, 05 Aug 2014 20:12:09 +0530
Vishal Mansur [off-list ref] wrote:
quoted
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.
From: Vishal Mansur <hidden> Date: 2014-08-13 07:30:12
On 8/11/2014 8:46 AM, Benjamin Herrenschmidt wrote:
On Tue, 2014-08-05 at 15:51 +0100, One Thousand Gnomes wrote:
quoted
On Tue, 05 Aug 2014 20:12:09 +0530
Vishal Mansur [off-list ref] wrote:
quoted
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