+ frv-io-accept-const-void-pointers-for-readbwl.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: arch/frv/include/asm/io.h: accept const void pointers for read{b,w,l}()
has been added to the -mm tree.  Its filename is
     frv-io-accept-const-void-pointers-for-readbwl.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/frv-io-accept-const-void-pointers-for-readbwl.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/frv-io-accept-const-void-pointers-for-readbwl.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
Subject: arch/frv/include/asm/io.h: accept const void pointers for read{b,w,l}()

The SMD driver is reading and writing chunks of data to iomem, and there's
an __iowrite32_copy() function for the writing part, but no
__ioread32_copy() function for the reading part.  This series adds
__ioread32_copy() and uses it in two places.


This patch (of 4):

The frv port uses compiler builtins, __builtin_read*(), for the I/O read
routines.  Unfortunately, these don't accept const void pointers although
the generic ASM implementations do, so generic code passing const pointers
to these APIs cause compilers to emit warnings.  Add wrapper functions
that cast away the const to avoid the warnings.

Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: <zajec5@xxxxxxxxx>
Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxxxxxx>
Cc: Hauke Mehrtens <hauke@xxxxxxxxxx>
Cc: Paul Walmsley <paul@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/frv/include/asm/io.h |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff -puN arch/frv/include/asm/io.h~frv-io-accept-const-void-pointers-for-readbwl arch/frv/include/asm/io.h
--- a/arch/frv/include/asm/io.h~frv-io-accept-const-void-pointers-for-readbwl
+++ a/arch/frv/include/asm/io.h
@@ -43,9 +43,20 @@ static inline unsigned long _swapl(unsig
 //#define __iormb() asm volatile("membar")
 //#define __iowmb() asm volatile("membar")
 
-#define __raw_readb __builtin_read8
-#define __raw_readw __builtin_read16
-#define __raw_readl __builtin_read32
+static inline u8 __raw_readb(const volatile void __iomem *addr)
+{
+	return __builtin_read8((volatile void __iomem *)addr);
+}
+
+static inline u16 __raw_readw(const volatile void __iomem *addr)
+{
+	return __builtin_read16((volatile void __iomem *)addr);
+}
+
+static inline u32 __raw_readl(const volatile void __iomem *addr)
+{
+	return __builtin_read32((volatile void __iomem *)addr);
+}
 
 #define __raw_writeb(datum, addr) __builtin_write8(addr, datum)
 #define __raw_writew(datum, addr) __builtin_write16(addr, datum)
_

Patches currently in -mm which might be from sboyd@xxxxxxxxxxxxxx are

frv-io-accept-const-void-pointers-for-readbwl.patch
lib-iomap_copy-add-__ioread32_copy.patch
soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it.patch
firmware-bcm47xx_nvram-use-__ioread32_copy-instead-of-open-coding.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux