Skip to content

Commit 07c3d9e

Browse files
lsgunthmpe
authored andcommitted
powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo}
These functions will be introduced into the generic iomap.c so they can deal with PIO accesses in hi-lo/lo-hi variants. Thus, the powerpc version of iomap.c will need to provide the same functions even though, in this arch, they are identical to the regular io{read|write}64 functions. Signed-off-by: Logan Gunthorpe <[email protected]> Tested-by: Horia Geantă <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent ef23703 commit 07c3d9e

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

arch/powerpc/kernel/iomap.c

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,32 @@ u64 ioread64(void __iomem *addr)
4545
{
4646
return readq(addr);
4747
}
48+
u64 ioread64_lo_hi(void __iomem *addr)
49+
{
50+
return readq(addr);
51+
}
52+
u64 ioread64_hi_lo(void __iomem *addr)
53+
{
54+
return readq(addr);
55+
}
4856
u64 ioread64be(void __iomem *addr)
4957
{
5058
return readq_be(addr);
5159
}
60+
u64 ioread64be_lo_hi(void __iomem *addr)
61+
{
62+
return readq_be(addr);
63+
}
64+
u64 ioread64be_hi_lo(void __iomem *addr)
65+
{
66+
return readq_be(addr);
67+
}
5268
EXPORT_SYMBOL(ioread64);
69+
EXPORT_SYMBOL(ioread64_lo_hi);
70+
EXPORT_SYMBOL(ioread64_hi_lo);
5371
EXPORT_SYMBOL(ioread64be);
72+
EXPORT_SYMBOL(ioread64be_lo_hi);
73+
EXPORT_SYMBOL(ioread64be_hi_lo);
5474
#endif /* __powerpc64__ */
5575

5676
void iowrite8(u8 val, void __iomem *addr)
@@ -83,12 +103,32 @@ void iowrite64(u64 val, void __iomem *addr)
83103
{
84104
writeq(val, addr);
85105
}
106+
void iowrite64_lo_hi(u64 val, void __iomem *addr)
107+
{
108+
writeq(val, addr);
109+
}
110+
void iowrite64_hi_lo(u64 val, void __iomem *addr)
111+
{
112+
writeq(val, addr);
113+
}
86114
void iowrite64be(u64 val, void __iomem *addr)
87115
{
88116
writeq_be(val, addr);
89117
}
118+
void iowrite64be_lo_hi(u64 val, void __iomem *addr)
119+
{
120+
writeq_be(val, addr);
121+
}
122+
void iowrite64be_hi_lo(u64 val, void __iomem *addr)
123+
{
124+
writeq_be(val, addr);
125+
}
90126
EXPORT_SYMBOL(iowrite64);
127+
EXPORT_SYMBOL(iowrite64_lo_hi);
128+
EXPORT_SYMBOL(iowrite64_hi_lo);
91129
EXPORT_SYMBOL(iowrite64be);
130+
EXPORT_SYMBOL(iowrite64be_lo_hi);
131+
EXPORT_SYMBOL(iowrite64be_hi_lo);
92132
#endif /* __powerpc64__ */
93133

94134
/*

0 commit comments

Comments
 (0)