diff options
author | Cédric Le Goater <clg@kaod.org> | 2017-08-30 21:46:10 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-09-02 21:02:34 +1000 |
commit | 994ea2f41999113d84c317da3ec1e10aa6469b3f (patch) | |
tree | 0564f84d38bc0d59ca14ddc02bb6c22c04bc9a43 /arch/powerpc/sysdev/xive/xive-internal.h | |
parent | 3b79b26101936bbdb7a5c69161c69d65a1108fb0 (diff) | |
download | kernel_replicant_linux-994ea2f41999113d84c317da3ec1e10aa6469b3f.tar.gz kernel_replicant_linux-994ea2f41999113d84c317da3ec1e10aa6469b3f.tar.bz2 kernel_replicant_linux-994ea2f41999113d84c317da3ec1e10aa6469b3f.zip |
powerpc/xive: introduce a common routine xive_queue_page_alloc()
This routine will be used in the spapr backend. Also introduce a short
xive_alloc_order() helper.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/sysdev/xive/xive-internal.h')
-rw-r--r-- | arch/powerpc/sysdev/xive/xive-internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xive/xive-internal.h b/arch/powerpc/sysdev/xive/xive-internal.h index d07ef2d29caf..dd1e2022cce4 100644 --- a/arch/powerpc/sysdev/xive/xive-internal.h +++ b/arch/powerpc/sysdev/xive/xive-internal.h @@ -56,6 +56,12 @@ struct xive_ops { bool xive_core_init(const struct xive_ops *ops, void __iomem *area, u32 offset, u8 max_prio); +__be32 *xive_queue_page_alloc(unsigned int cpu, u32 queue_shift); + +static inline u32 xive_alloc_order(u32 queue_shift) +{ + return (queue_shift > PAGE_SHIFT) ? (queue_shift - PAGE_SHIFT) : 0; +} extern bool xive_cmdline_disabled; |