···11+/*22+ * Memory barrier definitions. This is based on information published33+ * in the Processor Abstraction Layer and the System Abstraction Layer44+ * manual.55+ *66+ * Copyright (C) 1998-2003 Hewlett-Packard Co77+ * David Mosberger-Tang <davidm@hpl.hp.com>88+ * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>99+ * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>1010+ */1111+#ifndef _ASM_IA64_BARRIER_H1212+#define _ASM_IA64_BARRIER_H1313+1414+#include <linux/compiler.h>1515+1616+/*1717+ * Macros to force memory ordering. In these descriptions, "previous"1818+ * and "subsequent" refer to program order; "visible" means that all1919+ * architecturally visible effects of a memory access have occurred2020+ * (at a minimum, this means the memory has been read or written).2121+ *2222+ * wmb(): Guarantees that all preceding stores to memory-2323+ * like regions are visible before any subsequent2424+ * stores and that all following stores will be2525+ * visible only after all previous stores.2626+ * rmb(): Like wmb(), but for reads.2727+ * mb(): wmb()/rmb() combo, i.e., all previous memory2828+ * accesses are visible before all subsequent2929+ * accesses and vice versa. This is also known as3030+ * a "fence."3131+ *3232+ * Note: "mb()" and its variants cannot be used as a fence to order3333+ * accesses to memory mapped I/O registers. For that, mf.a needs to3434+ * be used. However, we don't want to always use mf.a because (a)3535+ * it's (presumably) much slower than mf and (b) mf.a is supported for3636+ * sequential memory pages only.3737+ */3838+#define mb() ia64_mf()3939+#define rmb() mb()4040+#define wmb() mb()4141+#define read_barrier_depends() do { } while(0)4242+4343+#ifdef CONFIG_SMP4444+# define smp_mb() mb()4545+# define smp_rmb() rmb()4646+# define smp_wmb() wmb()4747+# define smp_read_barrier_depends() read_barrier_depends()4848+#else4949+# define smp_mb() barrier()5050+# define smp_rmb() barrier()5151+# define smp_wmb() barrier()5252+# define smp_read_barrier_depends() do { } while(0)5353+#endif5454+5555+/*5656+ * XXX check on this ---I suspect what Linus really wants here is5757+ * acquire vs release semantics but we can't discuss this stuff with5858+ * Linus just yet. Grrr...5959+ */6060+#define set_mb(var, value) do { (var) = (value); mb(); } while (0)6161+6262+/*6363+ * The group barrier in front of the rsm & ssm are necessary to ensure6464+ * that none of the previous instructions in the same group are6565+ * affected by the rsm/ssm.6666+ */6767+6868+#endif /* _ASM_IA64_BARRIER_H */
+14
arch/ia64/include/asm/exec.h
···11+/*22+ * Process execution defines.33+ *44+ * Copyright (C) 1998-2003 Hewlett-Packard Co55+ * David Mosberger-Tang <davidm@hpl.hp.com>66+ * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>77+ * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>88+ */99+#ifndef _ASM_IA64_EXEC_H1010+#define _ASM_IA64_EXEC_H1111+1212+#define arch_align_stack(x) (x)1313+1414+#endif /* _ASM_IA64_EXEC_H */
···1010#ifndef _ASM_IA64_IRQFLAGS_H1111#define _ASM_IA64_IRQFLAGS_H12121313+#include <asm/pal.h>1414+1315#ifdef CONFIG_IA64_DEBUG_IRQ1416extern unsigned long last_cli_ip;1517static inline void arch_maybe_save_ip(unsigned long flags)
+1
arch/ia64/include/asm/kexec.h
···11#ifndef _ASM_IA64_KEXEC_H22#define _ASM_IA64_KEXEC_H3344+#include <asm/setup.h>4556/* Maximum physical address we can use pages from */67#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
···1111#include <asm/scatterlist.h>1212#include <asm/hw_irq.h>13131414+struct pci_vector_struct {1515+ __u16 segment; /* PCI Segment number */1616+ __u16 bus; /* PCI Bus number */1717+ __u32 pci_id; /* ACPI split 16 bits device, 16 bits function (see section 6.1.1) */1818+ __u8 pin; /* PCI PIN (0 = A, 1 = B, 2 = C, 3 = D) */1919+ __u32 irq; /* IRQ assigned */2020+};2121+1422/*1523 * Can be used to override the logic in pci_scan_bus for skipping already-configured bus1624 * numbers - to be used for buggy BIOSes or architectures with incomplete PCI setup by the
-1
arch/ia64/include/asm/pgtable.h
···1616#include <asm/mman.h>1717#include <asm/page.h>1818#include <asm/processor.h>1919-#include <asm/system.h>2019#include <asm/types.h>21202221#define IA64_MAX_PHYS_BITS 50 /* max. number of physical address bits (architected) */
···11+/*22+ * Low-level task switching. This is based on information published in33+ * the Processor Abstraction Layer and the System Abstraction Layer44+ * manual.55+ *66+ * Copyright (C) 1998-2003 Hewlett-Packard Co77+ * David Mosberger-Tang <davidm@hpl.hp.com>88+ * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>99+ * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>1010+ */1111+#ifndef _ASM_IA64_SWITCH_TO_H1212+#define _ASM_IA64_SWITCH_TO_H1313+1414+#include <linux/percpu.h>1515+1616+struct task_struct;1717+1818+/*1919+ * Context switch from one thread to another. If the two threads have2020+ * different address spaces, schedule() has already taken care of2121+ * switching to the new address space by calling switch_mm().2222+ *2323+ * Disabling access to the fph partition and the debug-register2424+ * context switch MUST be done before calling ia64_switch_to() since a2525+ * newly created thread returns directly to2626+ * ia64_ret_from_syscall_clear_r8.2727+ */2828+extern struct task_struct *ia64_switch_to (void *next_task);2929+3030+extern void ia64_save_extra (struct task_struct *task);3131+extern void ia64_load_extra (struct task_struct *task);3232+3333+#ifdef CONFIG_VIRT_CPU_ACCOUNTING3434+extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct *next);3535+# define IA64_ACCOUNT_ON_SWITCH(p,n) ia64_account_on_switch(p,n)3636+#else3737+# define IA64_ACCOUNT_ON_SWITCH(p,n)3838+#endif3939+4040+#ifdef CONFIG_PERFMON4141+ DECLARE_PER_CPU(unsigned long, pfm_syst_info);4242+# define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1)4343+#else4444+# define PERFMON_IS_SYSWIDE() (0)4545+#endif4646+4747+#define IA64_HAS_EXTRA_STATE(t) \4848+ ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \4949+ || PERFMON_IS_SYSWIDE())5050+5151+#define __switch_to(prev,next,last) do { \5252+ IA64_ACCOUNT_ON_SWITCH(prev, next); \5353+ if (IA64_HAS_EXTRA_STATE(prev)) \5454+ ia64_save_extra(prev); \5555+ if (IA64_HAS_EXTRA_STATE(next)) \5656+ ia64_load_extra(next); \5757+ ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \5858+ (last) = ia64_switch_to((next)); \5959+} while (0)6060+6161+#ifdef CONFIG_SMP6262+/*6363+ * In the SMP case, we save the fph state when context-switching away from a thread that6464+ * modified fph. This way, when the thread gets scheduled on another CPU, the CPU can6565+ * pick up the state from task->thread.fph, avoiding the complication of having to fetch6666+ * the latest fph state from another CPU. In other words: eager save, lazy restore.6767+ */6868+# define switch_to(prev,next,last) do { \6969+ if (ia64_psr(task_pt_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \7070+ ia64_psr(task_pt_regs(prev))->mfh = 0; \7171+ (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \7272+ __ia64_save_fpu((prev)->thread.fph); \7373+ } \7474+ __switch_to(prev, next, last); \7575+ /* "next" in old context is "current" in new context */ \7676+ if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) && \7777+ (task_cpu(current) != \7878+ task_thread_info(current)->last_cpu))) { \7979+ platform_migrate(current); \8080+ task_thread_info(current)->last_cpu = task_cpu(current); \8181+ } \8282+} while (0)8383+#else8484+# define switch_to(prev,next,last) __switch_to(prev, next, last)8585+#endif8686+8787+#endif /* _ASM_IA64_SWITCH_TO_H */
+4-203
arch/ia64/include/asm/system.h
···11-#ifndef _ASM_IA64_SYSTEM_H22-#define _ASM_IA64_SYSTEM_H33-44-/*55- * System defines. Note that this is included both from .c and .S66- * files, so it does only defines, not any C code. This is based77- * on information published in the Processor Abstraction Layer88- * and the System Abstraction Layer manual.99- *1010- * Copyright (C) 1998-2003 Hewlett-Packard Co1111- * David Mosberger-Tang <davidm@hpl.hp.com>1212- * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>1313- * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>1414- */1515-1616-#include <asm/kregs.h>1717-#include <asm/page.h>1818-#include <asm/pal.h>1919-#include <asm/percpu.h>2020-2121-#define GATE_ADDR RGN_BASE(RGN_GATE)2222-2323-/*2424- * 0xa000000000000000+2*PERCPU_PAGE_SIZE2525- * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)2626- */2727-#define KERNEL_START (GATE_ADDR+__IA64_UL_CONST(0x100000000))2828-#define PERCPU_ADDR (-PERCPU_PAGE_SIZE)2929-#define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE)3030-3131-#ifndef __ASSEMBLY__3232-3333-#include <linux/kernel.h>3434-#include <linux/types.h>3535-3636-#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */3737-3838-struct pci_vector_struct {3939- __u16 segment; /* PCI Segment number */4040- __u16 bus; /* PCI Bus number */4141- __u32 pci_id; /* ACPI split 16 bits device, 16 bits function (see section 6.1.1) */4242- __u8 pin; /* PCI PIN (0 = A, 1 = B, 2 = C, 3 = D) */4343- __u32 irq; /* IRQ assigned */4444-};4545-4646-extern struct ia64_boot_param {4747- __u64 command_line; /* physical address of command line arguments */4848- __u64 efi_systab; /* physical address of EFI system table */4949- __u64 efi_memmap; /* physical address of EFI memory map */5050- __u64 efi_memmap_size; /* size of EFI memory map */5151- __u64 efi_memdesc_size; /* size of an EFI memory map descriptor */5252- __u32 efi_memdesc_version; /* memory descriptor version */5353- struct {5454- __u16 num_cols; /* number of columns on console output device */5555- __u16 num_rows; /* number of rows on console output device */5656- __u16 orig_x; /* cursor's x position */5757- __u16 orig_y; /* cursor's y position */5858- } console_info;5959- __u64 fpswa; /* physical address of the fpswa interface */6060- __u64 initrd_start;6161- __u64 initrd_size;6262-} *ia64_boot_param;6363-6464-/*6565- * Macros to force memory ordering. In these descriptions, "previous"6666- * and "subsequent" refer to program order; "visible" means that all6767- * architecturally visible effects of a memory access have occurred6868- * (at a minimum, this means the memory has been read or written).6969- *7070- * wmb(): Guarantees that all preceding stores to memory-7171- * like regions are visible before any subsequent7272- * stores and that all following stores will be7373- * visible only after all previous stores.7474- * rmb(): Like wmb(), but for reads.7575- * mb(): wmb()/rmb() combo, i.e., all previous memory7676- * accesses are visible before all subsequent7777- * accesses and vice versa. This is also known as7878- * a "fence."7979- *8080- * Note: "mb()" and its variants cannot be used as a fence to order8181- * accesses to memory mapped I/O registers. For that, mf.a needs to8282- * be used. However, we don't want to always use mf.a because (a)8383- * it's (presumably) much slower than mf and (b) mf.a is supported for8484- * sequential memory pages only.8585- */8686-#define mb() ia64_mf()8787-#define rmb() mb()8888-#define wmb() mb()8989-#define read_barrier_depends() do { } while(0)9090-9191-#ifdef CONFIG_SMP9292-# define smp_mb() mb()9393-# define smp_rmb() rmb()9494-# define smp_wmb() wmb()9595-# define smp_read_barrier_depends() read_barrier_depends()9696-#else9797-# define smp_mb() barrier()9898-# define smp_rmb() barrier()9999-# define smp_wmb() barrier()100100-# define smp_read_barrier_depends() do { } while(0)101101-#endif102102-103103-/*104104- * XXX check on this ---I suspect what Linus really wants here is105105- * acquire vs release semantics but we can't discuss this stuff with106106- * Linus just yet. Grrr...107107- */108108-#define set_mb(var, value) do { (var) = (value); mb(); } while (0)109109-110110-/*111111- * The group barrier in front of the rsm & ssm are necessary to ensure112112- * that none of the previous instructions in the same group are113113- * affected by the rsm/ssm.114114- */115115-116116-#ifdef __KERNEL__117117-118118-/*119119- * Context switch from one thread to another. If the two threads have120120- * different address spaces, schedule() has already taken care of121121- * switching to the new address space by calling switch_mm().122122- *123123- * Disabling access to the fph partition and the debug-register124124- * context switch MUST be done before calling ia64_switch_to() since a125125- * newly created thread returns directly to126126- * ia64_ret_from_syscall_clear_r8.127127- */128128-extern struct task_struct *ia64_switch_to (void *next_task);129129-130130-struct task_struct;131131-132132-extern void ia64_save_extra (struct task_struct *task);133133-extern void ia64_load_extra (struct task_struct *task);134134-135135-#ifdef CONFIG_VIRT_CPU_ACCOUNTING136136-extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct *next);137137-# define IA64_ACCOUNT_ON_SWITCH(p,n) ia64_account_on_switch(p,n)138138-#else139139-# define IA64_ACCOUNT_ON_SWITCH(p,n)140140-#endif141141-142142-#ifdef CONFIG_PERFMON143143- DECLARE_PER_CPU(unsigned long, pfm_syst_info);144144-# define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1)145145-#else146146-# define PERFMON_IS_SYSWIDE() (0)147147-#endif148148-149149-#define IA64_HAS_EXTRA_STATE(t) \150150- ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \151151- || PERFMON_IS_SYSWIDE())152152-153153-#define __switch_to(prev,next,last) do { \154154- IA64_ACCOUNT_ON_SWITCH(prev, next); \155155- if (IA64_HAS_EXTRA_STATE(prev)) \156156- ia64_save_extra(prev); \157157- if (IA64_HAS_EXTRA_STATE(next)) \158158- ia64_load_extra(next); \159159- ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \160160- (last) = ia64_switch_to((next)); \161161-} while (0)162162-163163-#ifdef CONFIG_SMP164164-/*165165- * In the SMP case, we save the fph state when context-switching away from a thread that166166- * modified fph. This way, when the thread gets scheduled on another CPU, the CPU can167167- * pick up the state from task->thread.fph, avoiding the complication of having to fetch168168- * the latest fph state from another CPU. In other words: eager save, lazy restore.169169- */170170-# define switch_to(prev,next,last) do { \171171- if (ia64_psr(task_pt_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \172172- ia64_psr(task_pt_regs(prev))->mfh = 0; \173173- (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \174174- __ia64_save_fpu((prev)->thread.fph); \175175- } \176176- __switch_to(prev, next, last); \177177- /* "next" in old context is "current" in new context */ \178178- if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) && \179179- (task_cpu(current) != \180180- task_thread_info(current)->last_cpu))) { \181181- platform_migrate(current); \182182- task_thread_info(current)->last_cpu = task_cpu(current); \183183- } \184184-} while (0)185185-#else186186-# define switch_to(prev,next,last) __switch_to(prev, next, last)187187-#endif188188-189189-#define __ARCH_WANT_UNLOCKED_CTXSW190190-#define ARCH_HAS_PREFETCH_SWITCH_STACK191191-#define ia64_platform_is(x) (strcmp(x, platform_name) == 0)192192-193193-void cpu_idle_wait(void);194194-195195-#define arch_align_stack(x) (x)196196-197197-void default_idle(void);198198-199199-#endif /* __KERNEL__ */200200-201201-#endif /* __ASSEMBLY__ */202202-203203-#endif /* _ASM_IA64_SYSTEM_H */11+/* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */22+#include <asm/barrier.h>33+#include <asm/exec.h>44+#include <asm/switch_to.h>
-1
arch/ia64/include/asm/uv/uv.h
···11#ifndef _ASM_IA64_UV_UV_H22#define _ASM_IA64_UV_UV_H3344-#include <asm/system.h>54#include <asm/sn/simulator.h>6576static inline int is_uv_system(void)
···1414#include <linux/sched.h>1515#include <linux/mm.h>1616#include <asm/ptrace.h>1717-#include <asm/system.h>18171918/*2019 * For IA64 we need to perform a complex little dance to get both
···23232424void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order);25252626+struct vm_area_struct;2627int xen_remap_domain_mfn_range(struct vm_area_struct *vma,2728 unsigned long addr,2829 unsigned long mfn, int nr,