* [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.
@ 2013-04-19 11:24 Chen Gang
2013-04-19 12:13 ` Arnd Bergmann
2013-04-19 12:35 ` Catalin Marinas
0 siblings, 2 replies; 5+ messages in thread
From: Chen Gang @ 2013-04-19 11:24 UTC (permalink / raw)
To: linux-arm-kernel
when compiling with allmodconfig, CONFIG_64BIT=y
the file drivers/base/regmap/regmap-mmio.c will use readq and writeq.
so we need implement these functions.
BTW:
the coding style can not pass ./scripts/checkpatch.pl.
it seems better to provide additional patch for beautifying code.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
arch/arm64/include/asm/io.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
index 57f12c9..2e12258 100644
--- a/arch/arm64/include/asm/io.h
+++ b/arch/arm64/include/asm/io.h
@@ -92,10 +92,12 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
#define readb_relaxed(c) ({ u8 __v = __raw_readb(c); __v; })
#define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16)__raw_readw(c)); __v; })
#define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32)__raw_readl(c)); __v; })
+#define readq_relaxed(c) ({ u64 __v = le64_to_cpu((__force __le64)__raw_readq(c)); __v; })
#define writeb_relaxed(v,c) ((void)__raw_writeb((v),(c)))
#define writew_relaxed(v,c) ((void)__raw_writew((__force u16)cpu_to_le16(v),(c)))
#define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))
+#define writeq_relaxed(v,c) ((void)__raw_writeq((__force u64)cpu_to_le64(v),(c)))
/*
* I/O memory access primitives. Reads are ordered relative to any
@@ -105,10 +107,12 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; })
#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
+#define readq(c) ({ u64 __v = readq_relaxed(c); __iormb(); __v; })
#define writeb(v,c) ({ __iowmb(); writeb_relaxed((v),(c)); })
#define writew(v,c) ({ __iowmb(); writew_relaxed((v),(c)); })
#define writel(v,c) ({ __iowmb(); writel_relaxed((v),(c)); })
+#define writeq(v,c) ({ __iowmb(); writeq_relaxed((v),(c)); })
/*
* I/O port access primitives.
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.
2013-04-19 11:24 [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using Chen Gang
@ 2013-04-19 12:13 ` Arnd Bergmann
2013-04-20 2:48 ` Chen Gang F T
2013-04-19 12:35 ` Catalin Marinas
1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2013-04-19 12:13 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 19 April 2013, Chen Gang wrote:
> when compiling with allmodconfig, CONFIG_64BIT=y
> the file drivers/base/regmap/regmap-mmio.c will use readq and writeq.
>
> so we need implement these functions.
>
> BTW:
> the coding style can not pass ./scripts/checkpatch.pl.
> it seems better to provide additional patch for beautifying code.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.
2013-04-19 11:24 [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using Chen Gang
2013-04-19 12:13 ` Arnd Bergmann
@ 2013-04-19 12:35 ` Catalin Marinas
2013-04-20 1:54 ` Chen Gang
1 sibling, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2013-04-19 12:35 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 19, 2013 at 12:24:37PM +0100, Chen Gang wrote:
>
> when compiling with allmodconfig, CONFIG_64BIT=y
> the file drivers/base/regmap/regmap-mmio.c will use readq and writeq.
>
> so we need implement these functions.
>
> BTW:
> the coding style can not pass ./scripts/checkpatch.pl.
> it seems better to provide additional patch for beautifying code.
If it complains about long lines, just ignore it. I wouldn't worry too
much about checkpatch.pl and coding style warnings ;)
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Thanks.
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.
2013-04-19 12:35 ` Catalin Marinas
@ 2013-04-20 1:54 ` Chen Gang
0 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2013-04-20 1:54 UTC (permalink / raw)
To: linux-arm-kernel
On 2013?04?19? 20:35, Catalin Marinas wrote:
> On Fri, Apr 19, 2013 at 12:24:37PM +0100, Chen Gang wrote:
>> >
>> > when compiling with allmodconfig, CONFIG_64BIT=y
>> > the file drivers/base/regmap/regmap-mmio.c will use readq and writeq.
>> >
>> > so we need implement these functions.
>> >
>> > BTW:
>> > the coding style can not pass ./scripts/checkpatch.pl.
>> > it seems better to provide additional patch for beautifying code.
> If it complains about long lines, just ignore it. I wouldn't worry too
> much about checkpatch.pl and coding style warnings ;)
>
ok, I can understand.
:-)
--
Chen Gang
Asianux Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.
2013-04-19 12:13 ` Arnd Bergmann
@ 2013-04-20 2:48 ` Chen Gang F T
0 siblings, 0 replies; 5+ messages in thread
From: Chen Gang F T @ 2013-04-20 2:48 UTC (permalink / raw)
To: linux-arm-kernel
On 2013?04?19? 20:13, Arnd Bergmann wrote:
> On Friday 19 April 2013, Chen Gang wrote:
>> > when compiling with allmodconfig, CONFIG_64BIT=y
>> > the file drivers/base/regmap/regmap-mmio.c will use readq and writeq.
>> >
>> > so we need implement these functions.
>> >
>> > BTW:
>> > the coding style can not pass ./scripts/checkpatch.pl.
>> > it seems better to provide additional patch for beautifying code.
>> >
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
thanks.
--
Chen Gang
Flying Transformer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-20 2:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 11:24 [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using Chen Gang
2013-04-19 12:13 ` Arnd Bergmann
2013-04-20 2:48 ` Chen Gang F T
2013-04-19 12:35 ` Catalin Marinas
2013-04-20 1:54 ` Chen Gang
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).