#include <xen/init.h>
#include <xen/mm.h>
+#include <asm/fixmap.h>
+
static bool fixmap_inuse;
char *__acpi_map_table(paddr_t phys, unsigned long size)
#endif
-/* Fixmap slots */
-#define FIXMAP_CONSOLE 0 /* The primary UART */
-#define FIXMAP_MISC 1 /* Ephemeral mappings of hardware */
-#define FIXMAP_ACPI_BEGIN 2 /* Start mappings of ACPI tables */
-#define FIXMAP_ACPI_END (FIXMAP_ACPI_BEGIN + NUM_FIXMAP_ACPI_PAGES - 1) /* End mappings of ACPI tables */
-
#define NR_hypercalls 64
#define STACK_ORDER 3
#define __ARM_EARLY_PRINTK_H__
#include <xen/page-size.h>
+#include <asm/fixmap.h>
#ifdef CONFIG_EARLY_PRINTK
--- /dev/null
+/*
+ * fixmap.h: compile-time virtual memory allocation
+ */
+#ifndef __ASM_FIXMAP_H
+#define __ASM_FIXMAP_H
+
+#include <xen/acpi.h>
+
+/* Fixmap slots */
+#define FIXMAP_CONSOLE 0 /* The primary UART */
+#define FIXMAP_MISC 1 /* Ephemeral mappings of hardware */
+#define FIXMAP_ACPI_BEGIN 2 /* Start mappings of ACPI tables */
+#define FIXMAP_ACPI_END (FIXMAP_ACPI_BEGIN + NUM_FIXMAP_ACPI_PAGES - 1) /* End mappings of ACPI tables */
+
+#ifndef __ASSEMBLY__
+
+/* Map a page in a fixmap entry */
+extern void set_fixmap(unsigned map, mfn_t mfn, unsigned attributes);
+/* Remove a mapping from a fixmap entry */
+extern void clear_fixmap(unsigned map);
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_FIXMAP_H */
extern void setup_xenheap_mappings(unsigned long base_mfn, unsigned long nr_mfns);
/* Map a frame table to cover physical addresses ps through pe */
extern void setup_frametable_mappings(paddr_t ps, paddr_t pe);
-/* Map a 4k page in a fixmap entry */
-extern void set_fixmap(unsigned map, mfn_t mfn, unsigned attributes);
-/* Remove a mapping from a fixmap entry */
-extern void clear_fixmap(unsigned map);
/* map a physical range in virtual memory */
void __iomem *ioremap_attr(paddr_t start, size_t len, unsigned attributes);
#include <xen/vmap.h>
#include <asm/byteorder.h>
+#include <asm/fixmap.h>
#include <asm/kernel.h>
#include <asm/setup.h>
#include <xen/sizes.h>
#include <xen/libfdt/libfdt.h>
+#include <asm/fixmap.h>
#include <asm/setup.h>
/* Override macros from asm/page.h to make them work with mfn_t */
#define _LINUX
#endif
+/*
+ * Fixmap pages to reserve for ACPI boot-time tables (see
+ * arch/x86/include/asm/fixmap.h or arch/arm/include/asm/fixmap.h),
+ * 64 pages(256KB) is large enough for most cases.)
+ */
+#define NUM_FIXMAP_ACPI_PAGES 64
+
+#ifndef __ASSEMBLY__
+
#include <xen/list.h>
#include <acpi/acpi.h>
#define ACPI_MADT_GET_POLARITY(inti) ACPI_MADT_GET_(POLARITY, inti)
#define ACPI_MADT_GET_TRIGGER(inti) ACPI_MADT_GET_(TRIGGER, inti)
-/*
- * Fixmap pages to reserve for ACPI boot-time tables (see
- * arch/x86/include/asm/fixmap.h or arch/arm/include/asm/config.h,
- * 64 pages(256KB) is large enough for most cases.)
- */
-#define NUM_FIXMAP_ACPI_PAGES 64
-
#define BAD_MADT_ENTRY(entry, end) ( \
(!(entry)) || (unsigned long)(entry) + sizeof(*(entry)) > (end) || \
(entry)->header.length < sizeof(*(entry)))
void acpi_dmar_zap(void);
void acpi_dmar_reinstate(void);
+#endif /* __ASSEMBLY__ */
+
#endif /*_LINUX_ACPI_H*/