All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] block/ps3vram: Fix sparse warnings
  2015-06-10 18:00 [PATCH 0/3] block/ps3vram: Minor updates and fixes Geoff Levand
  2015-06-10 18:00 ` [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD Geert Uytterhoeven
@ 2015-06-10 18:00 ` Geoff Levand
  2015-06-10 18:00 ` [PATCH 3/3] MAINTAINERS: Update ps3vram block driver Geoff Levand
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Geoff Levand @ 2015-06-10 18:00 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Jim Paris, Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, linux-kernel

Fix sparse warnings like these:

 drivers/block/ps3vram.c: warning: incorrect type in assignment (different address spaces)
 drivers/block/ps3vram.c:    expected unsigned int [usertype] *ctrl
 drivers/block/ps3vram.c:    got void [noderef] <asn:2>*

Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 drivers/block/ps3vram.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index ef45cfb..a7bf836 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -73,8 +73,8 @@ struct ps3vram_priv {
 
 	u64 memory_handle;
 	u64 context_handle;
-	u32 *ctrl;
-	void *reports;
+	u32 __iomem *ctrl;
+	void __iomem *reports;
 	u8 *xdr_buf;
 
 	u32 *fifo_base;
@@ -104,7 +104,7 @@ static char *size = "256M";
 module_param(size, charp, 0);
 MODULE_PARM_DESC(size, "memory size");
 
-static u32 *ps3vram_get_notifier(void *reports, int notifier)
+static u32 __iomem *ps3vram_get_notifier(void __iomem *reports, int notifier)
 {
 	return reports + DMA_NOTIFIER_OFFSET_BASE +
 	       DMA_NOTIFIER_SIZE * notifier;
@@ -113,22 +113,22 @@ static u32 *ps3vram_get_notifier(void *reports, int notifier)
 static void ps3vram_notifier_reset(struct ps3_system_bus_device *dev)
 {
 	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
-	u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
+	u32 __iomem *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
 	int i;
 
 	for (i = 0; i < 4; i++)
-		notify[i] = 0xffffffff;
+		iowrite32be(0xffffffff, notify + i);
 }
 
 static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev,
 				 unsigned int timeout_ms)
 {
 	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
-	u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
+	u32 __iomem *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
 	unsigned long timeout;
 
 	for (timeout = 20; timeout; timeout--) {
-		if (!notify[3])
+		if (!ioread32be(notify + 3))
 			return 0;
 		udelay(10);
 	}
@@ -136,7 +136,7 @@ static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev,
 	timeout = jiffies + msecs_to_jiffies(timeout_ms);
 
 	do {
-		if (!notify[3])
+		if (!ioread32be(notify + 3))
 			return 0;
 		msleep(1);
 	} while (time_before(jiffies, timeout));
@@ -148,8 +148,8 @@ static void ps3vram_init_ring(struct ps3_system_bus_device *dev)
 {
 	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
 
-	priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET;
-	priv->ctrl[CTRL_GET] = FIFO_BASE + FIFO_OFFSET;
+	iowrite32be(FIFO_BASE + FIFO_OFFSET, priv->ctrl + CTRL_PUT);
+	iowrite32be(FIFO_BASE + FIFO_OFFSET, priv->ctrl + CTRL_GET);
 }
 
 static int ps3vram_wait_ring(struct ps3_system_bus_device *dev,
@@ -159,14 +159,14 @@ static int ps3vram_wait_ring(struct ps3_system_bus_device *dev,
 	unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms);
 
 	do {
-		if (priv->ctrl[CTRL_PUT] == priv->ctrl[CTRL_GET])
+		if (ioread32be(priv->ctrl + CTRL_PUT) == ioread32be(priv->ctrl + CTRL_GET))
 			return 0;
 		msleep(1);
 	} while (time_before(jiffies, timeout));
 
 	dev_warn(&dev->core, "FIFO timeout (%08x/%08x/%08x)\n",
-		 priv->ctrl[CTRL_PUT], priv->ctrl[CTRL_GET],
-		 priv->ctrl[CTRL_TOP]);
+		 ioread32be(priv->ctrl + CTRL_PUT), ioread32be(priv->ctrl + CTRL_GET),
+		 ioread32be(priv->ctrl + CTRL_TOP));
 
 	return -ETIMEDOUT;
 }
@@ -189,7 +189,7 @@ static void ps3vram_rewind_ring(struct ps3_system_bus_device *dev)
 
 	ps3vram_out_ring(priv, 0x20000000 | (FIFO_BASE + FIFO_OFFSET));
 
-	priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET;
+	iowrite32be(FIFO_BASE + FIFO_OFFSET, priv->ctrl + CTRL_PUT);
 
 	/* asking the HV for a blit will kick the FIFO */
 	status = lv1_gpu_fb_blit(priv->context_handle, 0, 0, 0, 0);
@@ -207,8 +207,8 @@ static void ps3vram_fire_ring(struct ps3_system_bus_device *dev)
 
 	mutex_lock(&ps3_gpu_mutex);
 
-	priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET +
-			       (priv->fifo_ptr - priv->fifo_base) * sizeof(u32);
+	iowrite32be(FIFO_BASE + FIFO_OFFSET + (priv->fifo_ptr - priv->fifo_base)
+		* sizeof(u32), priv->ctrl + CTRL_PUT);
 
 	/* asking the HV for a blit will kick the FIFO */
 	status = lv1_gpu_fb_blit(priv->context_handle, 0, 0, 0, 0);
-- 
2.1.0



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

* [PATCH 0/3] block/ps3vram: Minor updates and fixes
@ 2015-06-10 18:00 Geoff Levand
  2015-06-10 18:00 ` [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Geoff Levand @ 2015-06-10 18:00 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Jim Paris, Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, linux-kernel

Hi Jens,

Here are a few minor updates for the ps3vram driver.  The third patch adds me
as co-maintainer of the driver, which I think is fitting as I have been
maintaining it for the last few years and expect I would be involved in any
future inquiries regarding it.

Please apply, thanks.

-Geoff

The following changes since commit d4a4f75cd8f29cd9464a5a32e9224a91571d6649:

  Linux 4.1-rc7 (2015-06-07 20:23:50 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-2

for you to fetch changes up to 1d082300a03a735c006739907e6aea082007663c:

  MAINTAINERS: Update ps3vram block driver (2015-06-10 10:46:25 -0700)

----------------------------------------------------------------
Geert Uytterhoeven (1):
      block/ps3vram: Remove obsolete reference to MTD

Geoff Levand (2):
      block/ps3vram: Fix sparse warnings
      MAINTAINERS: Update ps3vram block driver

 MAINTAINERS             |  2 ++
 drivers/block/ps3vram.c | 34 +++++++++++++++++-----------------
 2 files changed, 19 insertions(+), 17 deletions(-)

-- 
2.1.0


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

* [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD
  2015-06-10 18:00 [PATCH 0/3] block/ps3vram: Minor updates and fixes Geoff Levand
@ 2015-06-10 18:00 ` Geert Uytterhoeven
  2015-06-11 13:04   ` Geert Uytterhoeven
  2015-06-10 18:00 ` [PATCH 1/3] block/ps3vram: Fix sparse warnings Geoff Levand
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2015-06-10 18:00 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Jim Paris, Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, linux-kernel

The ps3vram driver is a plain block device driver since commit
f507cd22035fdadd5dbb476dd05e9e7ee21c3b84 ("ps3/block: Replace mtd/ps3vram
by block/ps3vram").

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 drivers/block/ps3vram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index a7bf836..b1612eb 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -1,5 +1,5 @@
 /*
- * ps3vram - Use extra PS3 video ram as MTD block device.
+ * ps3vram - Use extra PS3 video ram as block device.
  *
  * Copyright 2009 Sony Corporation
  *
-- 
2.1.0



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

* [PATCH 3/3] MAINTAINERS: Update ps3vram block driver
  2015-06-10 18:00 [PATCH 0/3] block/ps3vram: Minor updates and fixes Geoff Levand
  2015-06-10 18:00 ` [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD Geert Uytterhoeven
  2015-06-10 18:00 ` [PATCH 1/3] block/ps3vram: Fix sparse warnings Geoff Levand
@ 2015-06-10 18:00 ` Geoff Levand
  2015-06-10 19:09 ` [PATCH 0/3] block/ps3vram: Minor updates and fixes Jim Paris
  2015-06-10 20:07 ` Jens Axboe
  4 siblings, 0 replies; 8+ messages in thread
From: Geoff Levand @ 2015-06-10 18:00 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Jim Paris, Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, linux-kernel

Add myself as co-maintainer of the ps3vram block driver, and add linuxppc-dev
as a relevant mailing list.

I have been acting as maintainer of this driver for the last several years, and
if there is some inquiry regarding it I would like to be notified.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index d8afd29..921809b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7882,6 +7882,8 @@ F:	sound/ppc/snd_ps3*
 
 PS3VRAM DRIVER
 M:	Jim Paris <jim@jtan.com>
+M:	Geoff Levand <geoff@infradead.org>
+L:	linuxppc-dev@lists.ozlabs.org
 L:	cbe-oss-dev@lists.ozlabs.org
 S:	Maintained
 F:	drivers/block/ps3vram.c
-- 
2.1.0


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

* Re: [PATCH 0/3] block/ps3vram: Minor updates and fixes
  2015-06-10 18:00 [PATCH 0/3] block/ps3vram: Minor updates and fixes Geoff Levand
                   ` (2 preceding siblings ...)
  2015-06-10 18:00 ` [PATCH 3/3] MAINTAINERS: Update ps3vram block driver Geoff Levand
@ 2015-06-10 19:09 ` Jim Paris
  2015-06-10 20:07 ` Jens Axboe
  4 siblings, 0 replies; 8+ messages in thread
From: Jim Paris @ 2015-06-10 19:09 UTC (permalink / raw)
  To: Geoff Levand
  Cc: Jens Axboe, Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, linux-kernel

Geoff Levand wrote:
> Hi Jens,
> 
> Here are a few minor updates for the ps3vram driver.  The third patch adds me
> as co-maintainer of the driver, which I think is fitting as I have been
> maintaining it for the last few years and expect I would be involved in any
> future inquiries regarding it.

Thanks Geoff.

Acked-by: Jim Paris <jim@jtan.com>

Jim

> 
> Please apply, thanks.
> 
> -Geoff
> 
> The following changes since commit d4a4f75cd8f29cd9464a5a32e9224a91571d6649:
> 
>   Linux 4.1-rc7 (2015-06-07 20:23:50 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-2
> 
> for you to fetch changes up to 1d082300a03a735c006739907e6aea082007663c:
> 
>   MAINTAINERS: Update ps3vram block driver (2015-06-10 10:46:25 -0700)
> 
> ----------------------------------------------------------------
> Geert Uytterhoeven (1):
>       block/ps3vram: Remove obsolete reference to MTD
> 
> Geoff Levand (2):
>       block/ps3vram: Fix sparse warnings
>       MAINTAINERS: Update ps3vram block driver
> 
>  MAINTAINERS             |  2 ++
>  drivers/block/ps3vram.c | 34 +++++++++++++++++-----------------
>  2 files changed, 19 insertions(+), 17 deletions(-)
> 
> -- 
> 2.1.0

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

* Re: [PATCH 0/3] block/ps3vram: Minor updates and fixes
  2015-06-10 18:00 [PATCH 0/3] block/ps3vram: Minor updates and fixes Geoff Levand
                   ` (3 preceding siblings ...)
  2015-06-10 19:09 ` [PATCH 0/3] block/ps3vram: Minor updates and fixes Jim Paris
@ 2015-06-10 20:07 ` Jens Axboe
  4 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2015-06-10 20:07 UTC (permalink / raw)
  To: Geoff Levand
  Cc: Jim Paris, Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, linux-kernel

On 06/10/2015 12:00 PM, Geoff Levand wrote:
> Hi Jens,
>
> Here are a few minor updates for the ps3vram driver.  The third patch adds me
> as co-maintainer of the driver, which I think is fitting as I have been
> maintaining it for the last few years and expect I would be involved in any
> future inquiries regarding it.
>
> Please apply, thanks.

Applied to for-4.2/drivers, thanks.

-- 
Jens Axboe


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

* Re: [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD
  2015-06-10 18:00 ` [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD Geert Uytterhoeven
@ 2015-06-11 13:04   ` Geert Uytterhoeven
  2015-06-11 14:54     ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2015-06-11 13:04 UTC (permalink / raw)
  To: Geoff Levand
  Cc: Jens Axboe, Jim Paris, Geert Uytterhoeven, linuxppc-dev,
	cbe-oss-dev, linux-kernel

On Wed, Jun 10, 2015 at 8:00 PM, Geert Uytterhoeven
<geert@linux-m68k.org> did not write:
> The ps3vram driver is a plain block device driver since commit
> f507cd22035fdadd5dbb476dd05e9e7ee21c3b84 ("ps3/block: Replace mtd/ps3vram
> by block/ps3vram").
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Geoff Levand <geoff@infradead.org>

For the record: while I did send out this patch back in 2013, I didn't resend it
yesterday.

Geoff:
  1. Please fix your scripts (start using git-send-email?), to avoid sending
     fake email. Thanks!
  2. I am grateful you didn't forget about this patch, and that it got applied.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD
  2015-06-11 13:04   ` Geert Uytterhoeven
@ 2015-06-11 14:54     ` Jens Axboe
  0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2015-06-11 14:54 UTC (permalink / raw)
  To: Geert Uytterhoeven, Geoff Levand
  Cc: Jim Paris, linuxppc-dev, cbe-oss-dev, linux-kernel

On 06/11/2015 07:04 AM, Geert Uytterhoeven wrote:
> On Wed, Jun 10, 2015 at 8:00 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> did not write:
>> The ps3vram driver is a plain block device driver since commit
>> f507cd22035fdadd5dbb476dd05e9e7ee21c3b84 ("ps3/block: Replace mtd/ps3vram
>> by block/ps3vram").
>>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Signed-off-by: Geoff Levand <geoff@infradead.org>
>
> For the record: while I did send out this patch back in 2013, I didn't resend it
> yesterday.
>
> Geoff:
>    1. Please fix your scripts (start using git-send-email?), to avoid sending
>       fake email. Thanks!

Indeed, 2/3 of these patches ended up in my spam.

>    2. I am grateful you didn't forget about this patch, and that it got applied.

I'll add:

3. Your git base should be the base of where you want this to be pulled 
in, or prior. Yours was 4.1-rc7, and I'm not pulling in tons of 
unrelated changes for 3 patches. If you are targeting the next release 
and don't depend on existing block changes, then your base should be 
4.0. If you are dependent on changes in the block tree, the block tree 
should be your base.

-- 
Jens Axboe


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

end of thread, other threads:[~2015-06-11 14:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 18:00 [PATCH 0/3] block/ps3vram: Minor updates and fixes Geoff Levand
2015-06-10 18:00 ` [PATCH 2/3] block/ps3vram: Remove obsolete reference to MTD Geert Uytterhoeven
2015-06-11 13:04   ` Geert Uytterhoeven
2015-06-11 14:54     ` Jens Axboe
2015-06-10 18:00 ` [PATCH 1/3] block/ps3vram: Fix sparse warnings Geoff Levand
2015-06-10 18:00 ` [PATCH 3/3] MAINTAINERS: Update ps3vram block driver Geoff Levand
2015-06-10 19:09 ` [PATCH 0/3] block/ps3vram: Minor updates and fixes Jim Paris
2015-06-10 20:07 ` Jens Axboe

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.