linux/include/asm-generic/fixmap.h

/*
 * fixmap.h: compile-time virtual memory allocation
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1998 Ingo Molnar
 *
 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
 * x86_32 and x86_64 integration by Gustavo F. Padovan, February 2009
 * Break out common bits to asm-generic by Mark Salter, November 2013
 */

#ifndef __ASM_GENERIC_FIXMAP_H
#define __ASM_GENERIC_FIXMAP_H

#include <linux/bug.h>
#include <linux/mm_types.h>

#define __fix_to_virt(x)
#define __virt_to_fix(x)

#ifndef __ASSEMBLY__
/*
 * 'index to address' translation. If anyone tries to use the idx
 * directly without translation, we catch the bug with a NULL-deference
 * kernel oops. Illegal ranges of incoming indices are caught too.
 */
static __always_inline unsigned long fix_to_virt(const unsigned int idx)
{}

static inline unsigned long virt_to_fix(const unsigned long vaddr)
{}

/*
 * Provide some reasonable defaults for page flags.
 * Not all architectures use all of these different types and some
 * architectures use different names.
 */
#ifndef FIXMAP_PAGE_NORMAL
#define FIXMAP_PAGE_NORMAL
#endif
#if !defined(FIXMAP_PAGE_RO) && defined(PAGE_KERNEL_RO)
#define FIXMAP_PAGE_RO
#endif
#ifndef FIXMAP_PAGE_NOCACHE
#define FIXMAP_PAGE_NOCACHE
#endif
#ifndef FIXMAP_PAGE_IO
#define FIXMAP_PAGE_IO
#endif
#ifndef FIXMAP_PAGE_CLEAR
#define FIXMAP_PAGE_CLEAR
#endif

#ifndef set_fixmap
#define set_fixmap(idx, phys)
#endif

#ifndef clear_fixmap
#define clear_fixmap(idx)
#endif

/* Return a pointer with offset calculated */
#define __set_fixmap_offset(idx, phys, flags)

#define set_fixmap_offset(idx, phys)

/*
 * Some hardware wants to get fixmapped without caching.
 */
#define set_fixmap_nocache(idx, phys)

#define set_fixmap_offset_nocache(idx, phys)

/*
 * Some fixmaps are for IO
 */
#define set_fixmap_io(idx, phys)

#endif /* __ASSEMBLY__ */
#endif /* __ASM_GENERIC_FIXMAP_H */