Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253675 > unrolled thread
| Started by | Eric Auger <eric.auger@linaro.org> |
|---|---|
| First post | 2015-10-22 11:50 +0200 |
| Last post | 2015-10-22 14:30 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Eric Auger <eric.auger@linaro.org> - 2015-10-22 11:50 +0200
Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Arnd Bergmann <arnd@arndb.de> - 2015-10-22 12:20 +0200
Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Eric Auger <eric.auger@linaro.org> - 2015-10-22 14:00 +0200
Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Arnd Bergmann <arnd@arndb.de> - 2015-10-22 14:20 +0200
Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Eric Auger <eric.auger@linaro.org> - 2015-10-22 14:30 +0200
| From | Eric Auger <eric.auger@linaro.org> |
|---|---|
| Date | 2015-10-22 11:50 +0200 |
| Subject | [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration |
| Message-ID | <qmkFs-6UJ-27@gated-at.bofh.it> |
This patch adds the reset function registration/unregistration.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
v1 -> v2:
- uses the module_vfio_reset_handler macro
- add pr_info on vfio reset
- do not export vfio_platform_calxedaxgmac_reset symbol anymore
---
drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
index 619dc7d..8b2cccc 100644
--- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
+++ b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
@@ -25,13 +25,12 @@
#include <linux/io.h>
#include "vfio_platform_private.h"
+#include "vfio_platform_reset_private.h"
#define DRIVER_VERSION "0.1"
#define DRIVER_AUTHOR "Eric Auger <eric.auger@linaro.org>"
#define DRIVER_DESC "Reset support for Calxeda xgmac vfio platform device"
-#define CALXEDAXGMAC_COMPAT "calxeda,hb-xgmac"
-
/* XGMAC Register definitions */
#define XGMAC_CONTROL 0x00000000 /* MAC Configuration */
@@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
return -ENOMEM;
}
+ pr_info("VFIO reset of %s\n", vdev->name);
+
/* disable IRQ */
writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA);
@@ -78,7 +79,9 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
return 0;
}
-EXPORT_SYMBOL_GPL(vfio_platform_calxedaxgmac_reset);
+
+module_vfio_reset_handler("calxeda,hb-xgmac",
+ vfio_platform_calxedaxgmac_reset);
MODULE_VERSION(DRIVER_VERSION);
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-22 12:20 +0200 |
| Message-ID | <qml8w-7Jh-27@gated-at.bofh.it> |
| In reply to | #1253675 |
On Thursday 22 October 2015 11:41:59 Eric Auger wrote:
> This patch adds the reset function registration/unregistration.
>
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
Looks good, except one thing:
> @@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
> return -ENOMEM;
> }
>
> + pr_info("VFIO reset of %s\n", vdev->name);
> +
> /* disable IRQ */
> writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA);
>
This probably slipped in from debugging, please remove it.
Arnd
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Eric Auger <eric.auger@linaro.org> |
|---|---|
| Date | 2015-10-22 14:00 +0200 |
| Subject | Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration |
| Message-ID | <qmmHg-1w5-3@gated-at.bofh.it> |
| In reply to | #1253694 |
On 10/22/2015 12:13 PM, Arnd Bergmann wrote:
> On Thursday 22 October 2015 11:41:59 Eric Auger wrote:
>> This patch adds the reset function registration/unregistration.
>>
>> Signed-off-by: Eric Auger <eric.auger@linaro.org>
>
> Looks good, except one thing:
>> @@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
>> return -ENOMEM;
>> }
>>
>> + pr_info("VFIO reset of %s\n", vdev->name);
>> +
>> /* disable IRQ */
>> writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA);
>>
>
> This probably slipped in from debugging, please remove it.
Well actually this is not an oversight but some unappropriate tracing
attempt I am afraid. I wanted to add a trace useful for the end-user to
make sure the VFIO reset function was called. Do you forbid that or do
recommend to use another tracing mechanism/level? In the past I tried
dynamic tracing but with module loading mechanism I found it not that handy.
Eric
>
> Arnd
>
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-22 14:20 +0200 |
| Message-ID | <qmn0C-28d-21@gated-at.bofh.it> |
| In reply to | #1253732 |
On Thursday 22 October 2015 13:54:42 Eric Auger wrote:
> On 10/22/2015 12:13 PM, Arnd Bergmann wrote:
> > On Thursday 22 October 2015 11:41:59 Eric Auger wrote:
> >> This patch adds the reset function registration/unregistration.
> >>
> >> Signed-off-by: Eric Auger <eric.auger@linaro.org>
> >
> > Looks good, except one thing:
> >> @@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
> >> return -ENOMEM;
> >> }
> >>
> >> + pr_info("VFIO reset of %s\n", vdev->name);
> >> +
> >> /* disable IRQ */
> >> writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA);
> >>
> >
> > This probably slipped in from debugging, please remove it.
> Well actually this is not an oversight but some unappropriate tracing
> attempt I am afraid. I wanted to add a trace useful for the end-user to
> make sure the VFIO reset function was called. Do you forbid that or do
> recommend to use another tracing mechanism/level? In the past I tried
> dynamic tracing but with module loading mechanism I found it not that handy.
If you think it's useful to have in the long run, it should be a separate
patch with a description what it's good for, rather than a side-effect of
an unrelated patch. It just looked to me like it's something you do
while debugging the reset code, rather than while using it.
Implementation-wise, you should use dev_info() instead of pr_info() where
possible, and it probably makes sense to put this into the vfio_platform
driver before calling the reset function, for consistency between the
drivers.
Arnd
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Eric Auger <eric.auger@linaro.org> |
|---|---|
| Date | 2015-10-22 14:30 +0200 |
| Subject | Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration |
| Message-ID | <qmnai-2ka-9@gated-at.bofh.it> |
| In reply to | #1253752 |
On 10/22/2015 02:09 PM, Arnd Bergmann wrote:
> On Thursday 22 October 2015 13:54:42 Eric Auger wrote:
>> On 10/22/2015 12:13 PM, Arnd Bergmann wrote:
>>> On Thursday 22 October 2015 11:41:59 Eric Auger wrote:
>>>> This patch adds the reset function registration/unregistration.
>>>>
>>>> Signed-off-by: Eric Auger <eric.auger@linaro.org>
>>>
>>> Looks good, except one thing:
>>>> @@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
>>>> return -ENOMEM;
>>>> }
>>>>
>>>> + pr_info("VFIO reset of %s\n", vdev->name);
>>>> +
>>>> /* disable IRQ */
>>>> writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA);
>>>>
>>>
>>> This probably slipped in from debugging, please remove it.
>> Well actually this is not an oversight but some unappropriate tracing
>> attempt I am afraid. I wanted to add a trace useful for the end-user to
>> make sure the VFIO reset function was called. Do you forbid that or do
>> recommend to use another tracing mechanism/level? In the past I tried
>> dynamic tracing but with module loading mechanism I found it not that handy.
>
> If you think it's useful to have in the long run, it should be a separate
> patch with a description what it's good for, rather than a side-effect of
> an unrelated patch. It just looked to me like it's something you do
> while debugging the reset code, rather than while using it.
>
> Implementation-wise, you should use dev_info() instead of pr_info() where
> possible, and it probably makes sense to put this into the vfio_platform
> driver before calling the reset function, for consistency between the
> drivers.
OK thanks
Best Regards
Eric
>
> Arnd
>
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web