powerpc/hugetlb: Don't do runtime allocation of 16G pages in LPAR configuration
[linux-2.6-block.git] / include / linux / goldfish.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
425f3740
A
2#ifndef __LINUX_GOLDFISH_H
3#define __LINUX_GOLDFISH_H
4
68275680 5#include <linux/kernel.h>
72755eed
RK
6#include <linux/types.h>
7#include <linux/io.h>
8
425f3740
A
9/* Helpers for Goldfish virtual platform */
10
07d783fd
PST
11static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
12 void __iomem *porth)
425f3740 13{
68275680
RK
14 const unsigned long addr = (unsigned long)ptr;
15
16 writel(lower_32_bits(addr), portl);
8d9e9857 17#ifdef CONFIG_64BIT
68275680 18 writel(upper_32_bits(addr), porth);
425f3740
A
19#endif
20}
21
07d783fd
PST
22static inline void gf_write_dma_addr(const dma_addr_t addr,
23 void __iomem *portl,
24 void __iomem *porth)
25{
68275680 26 writel(lower_32_bits(addr), portl);
07d783fd 27#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
68275680 28 writel(upper_32_bits(addr), porth);
07d783fd
PST
29#endif
30}
31
32
425f3740 33#endif /* __LINUX_GOLDFISH_H */