// SPDX-License-Identifier: GPL-2.0-only12#include <linux/export.h>3#include <linux/io.h>45/**6* __ioread64_copy - copy data from MMIO space, in 64-bit units7* @to: destination (must be 64-bit aligned)8* @from: source, in MMIO space (must be 64-bit aligned)9* @count: number of 64-bit quantities to copy10*11* Copy data from MMIO space to kernel space, in units of 32 or 64 bits at a12* time. Order of access is not guaranteed, nor is a memory barrier13* performed afterwards.14*/15void __ioread64_copy(void *to, const void __iomem *from, size_t count)16{17#ifdef CONFIG_64BIT18u64 *dst = to;19const u64 __iomem *src = from;20const u64 __iomem *end = src + count;2122while (src < end)23*dst++ = __raw_readq(src++);24#else25__ioread32_copy(to, from, count * 2);26#endif27}28EXPORT_SYMBOL_GPL(__ioread64_copy);293031