Skip to content

Commit

Permalink
parisc: Add ioread64_lo_hi() and iowrite64_lo_hi()
Browse files Browse the repository at this point in the history
commit 18a1d5e upstream.

It's a followup to the previous commit f15309d ("parisc: Add
ioread64_hi_lo() and iowrite64_hi_lo()") which does only half of
the job. Add the rest, so we won't get a new kernel test robot
reports.

Fixes: f15309d ("parisc: Add ioread64_hi_lo() and iowrite64_hi_lo()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
andy-shev authored and gregkh committed Feb 23, 2022
1 parent ade1077 commit 78a68bb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions arch/parisc/lib/iomap.c
Expand Up @@ -346,6 +346,16 @@ u64 ioread64be(const void __iomem *addr)
return *((u64 *)addr);
}

u64 ioread64_lo_hi(const void __iomem *addr)
{
u32 low, high;

low = ioread32(addr);
high = ioread32(addr + sizeof(u32));

return low + ((u64)high << 32);
}

u64 ioread64_hi_lo(const void __iomem *addr)
{
u32 low, high;
Expand Down Expand Up @@ -419,6 +429,12 @@ void iowrite64be(u64 datum, void __iomem *addr)
}
}

void iowrite64_lo_hi(u64 val, void __iomem *addr)
{
iowrite32(val, addr);
iowrite32(val >> 32, addr + sizeof(u32));
}

void iowrite64_hi_lo(u64 val, void __iomem *addr)
{
iowrite32(val >> 32, addr + sizeof(u32));
Expand Down Expand Up @@ -527,6 +543,7 @@ EXPORT_SYMBOL(ioread32);
EXPORT_SYMBOL(ioread32be);
EXPORT_SYMBOL(ioread64);
EXPORT_SYMBOL(ioread64be);
EXPORT_SYMBOL(ioread64_lo_hi);
EXPORT_SYMBOL(ioread64_hi_lo);
EXPORT_SYMBOL(iowrite8);
EXPORT_SYMBOL(iowrite16);
Expand All @@ -535,6 +552,7 @@ EXPORT_SYMBOL(iowrite32);
EXPORT_SYMBOL(iowrite32be);
EXPORT_SYMBOL(iowrite64);
EXPORT_SYMBOL(iowrite64be);
EXPORT_SYMBOL(iowrite64_lo_hi);
EXPORT_SYMBOL(iowrite64_hi_lo);
EXPORT_SYMBOL(ioread8_rep);
EXPORT_SYMBOL(ioread16_rep);
Expand Down

0 comments on commit 78a68bb

Please sign in to comment.