diff options
Diffstat (limited to 'include/asm-ia64')
56 files changed, 194 insertions, 116 deletions
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild new file mode 100644 index 000000000000..f1cb00f39c22 --- /dev/null +++ b/include/asm-ia64/Kbuild | |||
@@ -0,0 +1,7 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | |||
3 | header-y += break.h fpu.h fpswa.h gcc_intrin.h ia64regs.h \ | ||
4 | intel_intrin.h intrinsics.h perfmon_default_smpl.h \ | ||
5 | ptrace_offsets.h rse.h setup.h ucontext.h | ||
6 | |||
7 | unifdef-y += perfmon.h ustack.h | ||
diff --git a/include/asm-ia64/asmmacro.h b/include/asm-ia64/asmmacro.h index edf2cebb2969..c22b4658fc61 100644 --- a/include/asm-ia64/asmmacro.h +++ b/include/asm-ia64/asmmacro.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #define ENTRY(name) \ | 10 | #define ENTRY(name) \ |
12 | .align 32; \ | 11 | .align 32; \ |
diff --git a/include/asm-ia64/cache.h b/include/asm-ia64/cache.h index f0a104db8f20..e7482bd628ff 100644 --- a/include/asm-ia64/cache.h +++ b/include/asm-ia64/cache.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_IA64_CACHE_H | 1 | #ifndef _ASM_IA64_CACHE_H |
2 | #define _ASM_IA64_CACHE_H | 2 | #define _ASM_IA64_CACHE_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * Copyright (C) 1998-2000 Hewlett-Packard Co | 6 | * Copyright (C) 1998-2000 Hewlett-Packard Co |
diff --git a/include/asm-ia64/delay.h b/include/asm-ia64/delay.h index bba702076391..a30a62f235e1 100644 --- a/include/asm-ia64/delay.h +++ b/include/asm-ia64/delay.h | |||
@@ -12,7 +12,6 @@ | |||
12 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> | 12 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
18 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h index df67d40801de..99a8f8e1218c 100644 --- a/include/asm-ia64/dma-mapping.h +++ b/include/asm-ia64/dma-mapping.h | |||
@@ -5,7 +5,6 @@ | |||
5 | * Copyright (C) 2003-2004 Hewlett-Packard Co | 5 | * Copyright (C) 2003-2004 Hewlett-Packard Co |
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | #include <linux/config.h> | ||
9 | #include <asm/machvec.h> | 8 | #include <asm/machvec.h> |
10 | 9 | ||
11 | #define dma_alloc_coherent platform_dma_alloc_coherent | 10 | #define dma_alloc_coherent platform_dma_alloc_coherent |
diff --git a/include/asm-ia64/dma.h b/include/asm-ia64/dma.h index 3be1b4925e18..dad3a735df8b 100644 --- a/include/asm-ia64/dma.h +++ b/include/asm-ia64/dma.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #include <asm/io.h> /* need byte IO */ | 10 | #include <asm/io.h> /* need byte IO */ |
12 | 11 | ||
diff --git a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h index 446fce036fd9..25f9835d5459 100644 --- a/include/asm-ia64/elf.h +++ b/include/asm-ia64/elf.h | |||
@@ -8,7 +8,6 @@ | |||
8 | * David Mosberger-Tang <davidm@hpl.hp.com> | 8 | * David Mosberger-Tang <davidm@hpl.hp.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | 11 | ||
13 | #include <asm/fpu.h> | 12 | #include <asm/fpu.h> |
14 | #include <asm/page.h> | 13 | #include <asm/page.h> |
diff --git a/include/asm-ia64/hardirq.h b/include/asm-ia64/hardirq.h index 33ef8f096d95..140e495b8e0e 100644 --- a/include/asm-ia64/hardirq.h +++ b/include/asm-ia64/hardirq.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #include <linux/threads.h> | 10 | #include <linux/threads.h> |
12 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index 0cf119b42f7d..27f9df6b9145 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h | |||
@@ -47,9 +47,19 @@ typedef u8 ia64_vector; | |||
47 | #define IA64_CMC_VECTOR 0x1f /* corrected machine-check interrupt vector */ | 47 | #define IA64_CMC_VECTOR 0x1f /* corrected machine-check interrupt vector */ |
48 | /* | 48 | /* |
49 | * Vectors 0x20-0x2f are reserved for legacy ISA IRQs. | 49 | * Vectors 0x20-0x2f are reserved for legacy ISA IRQs. |
50 | * Use vectors 0x30-0xe7 as the default device vector range for ia64. | ||
51 | * Platforms may choose to reduce this range in platform_irq_setup, but the | ||
52 | * platform range must fall within | ||
53 | * [IA64_DEF_FIRST_DEVICE_VECTOR..IA64_DEF_LAST_DEVICE_VECTOR] | ||
50 | */ | 54 | */ |
51 | #define IA64_FIRST_DEVICE_VECTOR 0x30 | 55 | extern int ia64_first_device_vector; |
52 | #define IA64_LAST_DEVICE_VECTOR 0xe7 | 56 | extern int ia64_last_device_vector; |
57 | |||
58 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 | ||
59 | #define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 | ||
60 | #define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector | ||
61 | #define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector | ||
62 | #define IA64_MAX_DEVICE_VECTORS (IA64_DEF_LAST_DEVICE_VECTOR - IA64_DEF_FIRST_DEVICE_VECTOR + 1) | ||
53 | #define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1) | 63 | #define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1) |
54 | 64 | ||
55 | #define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */ | 65 | #define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */ |
@@ -83,11 +93,11 @@ extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt | |||
83 | 93 | ||
84 | extern int assign_irq_vector (int irq); /* allocate a free vector */ | 94 | extern int assign_irq_vector (int irq); /* allocate a free vector */ |
85 | extern void free_irq_vector (int vector); | 95 | extern void free_irq_vector (int vector); |
96 | extern int reserve_irq_vector (int vector); | ||
86 | extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); | 97 | extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); |
87 | extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); | 98 | extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); |
88 | 99 | ||
89 | static inline void | 100 | static inline void ia64_resend_irq(unsigned int vector) |
90 | hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) | ||
91 | { | 101 | { |
92 | platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); | 102 | platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); |
93 | } | 103 | } |
diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h index f8044a1169cd..5ff8d74c3e00 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_IA64_IA32_H | 1 | #ifndef _ASM_IA64_IA32_H |
2 | #define _ASM_IA64_IA32_H | 2 | #define _ASM_IA64_IA32_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #include <asm/ptrace.h> | 5 | #include <asm/ptrace.h> |
7 | #include <asm/signal.h> | 6 | #include <asm/signal.h> |
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index 93f45c5f189f..e928675de352 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
19 | 18 | ||
diff --git a/include/asm-ia64/intrinsics.h b/include/asm-ia64/intrinsics.h index 8089f955e5d2..3a95aa432e99 100644 --- a/include/asm-ia64/intrinsics.h +++ b/include/asm-ia64/intrinsics.h | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | /* include compiler specific intrinsics */ | 13 | /* include compiler specific intrinsics */ |
15 | #include <asm/ia64regs.h> | 14 | #include <asm/ia64regs.h> |
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index c2e3742108bb..43bfff6c6b87 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -88,8 +88,9 @@ phys_to_virt (unsigned long address) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | 90 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE |
91 | extern u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size); | ||
91 | extern int valid_phys_addr_range (unsigned long addr, size_t count); /* efi.c */ | 92 | extern int valid_phys_addr_range (unsigned long addr, size_t count); /* efi.c */ |
92 | extern int valid_mmap_phys_addr_range (unsigned long addr, size_t count); | 93 | extern int valid_mmap_phys_addr_range (unsigned long pfn, size_t count); |
93 | 94 | ||
94 | /* | 95 | /* |
95 | * The following two macros are deprecated and scheduled for removal. | 96 | * The following two macros are deprecated and scheduled for removal. |
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index dbe86c0bbce5..79479e2c6966 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h | |||
@@ -14,11 +14,6 @@ | |||
14 | #define NR_IRQS 256 | 14 | #define NR_IRQS 256 |
15 | #define NR_IRQ_VECTORS NR_IRQS | 15 | #define NR_IRQ_VECTORS NR_IRQS |
16 | 16 | ||
17 | /* | ||
18 | * IRQ line status macro IRQ_PER_CPU is used | ||
19 | */ | ||
20 | #define ARCH_HAS_IRQ_PER_CPU | ||
21 | |||
22 | static __inline__ int | 17 | static __inline__ int |
23 | irq_canonicalize (int irq) | 18 | irq_canonicalize (int irq) |
24 | { | 19 | { |
diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h index c195a9ad1255..aed7142f9e4a 100644 --- a/include/asm-ia64/kdebug.h +++ b/include/asm-ia64/kdebug.h | |||
@@ -40,6 +40,8 @@ struct die_args { | |||
40 | 40 | ||
41 | extern int register_die_notifier(struct notifier_block *); | 41 | extern int register_die_notifier(struct notifier_block *); |
42 | extern int unregister_die_notifier(struct notifier_block *); | 42 | extern int unregister_die_notifier(struct notifier_block *); |
43 | extern int register_page_fault_notifier(struct notifier_block *); | ||
44 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
43 | extern struct atomic_notifier_head ia64die_chain; | 45 | extern struct atomic_notifier_head ia64die_chain; |
44 | 46 | ||
45 | enum die_val { | 47 | enum die_val { |
diff --git a/include/asm-ia64/kmap_types.h b/include/asm-ia64/kmap_types.h index bc777525fa12..5d1658aa2b3b 100644 --- a/include/asm-ia64/kmap_types.h +++ b/include/asm-ia64/kmap_types.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_IA64_KMAP_TYPES_H | 1 | #ifndef _ASM_IA64_KMAP_TYPES_H |
2 | #define _ASM_IA64_KMAP_TYPES_H | 2 | #define _ASM_IA64_KMAP_TYPES_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #ifdef CONFIG_DEBUG_HIGHMEM | 5 | #ifdef CONFIG_DEBUG_HIGHMEM |
7 | # define D(n) __KM_FENCE_##n , | 6 | # define D(n) __KM_FENCE_##n , |
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 8c0fc227f0fb..938904910115 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -82,6 +82,7 @@ struct kprobe_ctlblk { | |||
82 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 82 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
83 | 83 | ||
84 | #define ARCH_SUPPORTS_KRETPROBES | 84 | #define ARCH_SUPPORTS_KRETPROBES |
85 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | ||
85 | 86 | ||
86 | #define SLOT0_OPCODE_SHIFT (37) | 87 | #define SLOT0_OPCODE_SHIFT (37) |
87 | #define SLOT1_p1_OPCODE_SHIFT (37 - (64-46)) | 88 | #define SLOT1_p1_OPCODE_SHIFT (37 - (64-46)) |
@@ -124,5 +125,6 @@ static inline void jprobe_return(void) | |||
124 | } | 125 | } |
125 | extern void invalidate_stacked_regs(void); | 126 | extern void invalidate_stacked_regs(void); |
126 | extern void flush_register_stack(void); | 127 | extern void flush_register_stack(void); |
128 | extern void flush_insn_slot(struct kprobe *p); | ||
127 | 129 | ||
128 | #endif /* _ASM_KPROBES_H */ | 130 | #endif /* _ASM_KPROBES_H */ |
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index a9c995a86c21..15b545a897a4 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _ASM_IA64_MACHVEC_H | 10 | #ifndef _ASM_IA64_MACHVEC_H |
11 | #define _ASM_IA64_MACHVEC_H | 11 | #define _ASM_IA64_MACHVEC_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | 14 | ||
16 | /* forward declarations: */ | 15 | /* forward declarations: */ |
@@ -76,6 +75,7 @@ typedef unsigned char ia64_mv_readb_relaxed_t (const volatile void __iomem *); | |||
76 | typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *); | 75 | typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *); |
77 | typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *); | 76 | typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *); |
78 | typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *); | 77 | typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *); |
78 | typedef int ia64_mv_msi_init_t (void); | ||
79 | 79 | ||
80 | static inline void | 80 | static inline void |
81 | machvec_noop (void) | 81 | machvec_noop (void) |
@@ -154,6 +154,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
154 | # define platform_readl_relaxed ia64_mv.readl_relaxed | 154 | # define platform_readl_relaxed ia64_mv.readl_relaxed |
155 | # define platform_readq_relaxed ia64_mv.readq_relaxed | 155 | # define platform_readq_relaxed ia64_mv.readq_relaxed |
156 | # define platform_migrate ia64_mv.migrate | 156 | # define platform_migrate ia64_mv.migrate |
157 | # define platform_msi_init ia64_mv.msi_init | ||
157 | # endif | 158 | # endif |
158 | 159 | ||
159 | /* __attribute__((__aligned__(16))) is required to make size of the | 160 | /* __attribute__((__aligned__(16))) is required to make size of the |
@@ -203,6 +204,7 @@ struct ia64_machine_vector { | |||
203 | ia64_mv_readl_relaxed_t *readl_relaxed; | 204 | ia64_mv_readl_relaxed_t *readl_relaxed; |
204 | ia64_mv_readq_relaxed_t *readq_relaxed; | 205 | ia64_mv_readq_relaxed_t *readq_relaxed; |
205 | ia64_mv_migrate_t *migrate; | 206 | ia64_mv_migrate_t *migrate; |
207 | ia64_mv_msi_init_t *msi_init; | ||
206 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ | 208 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ |
207 | 209 | ||
208 | #define MACHVEC_INIT(name) \ | 210 | #define MACHVEC_INIT(name) \ |
@@ -248,6 +250,7 @@ struct ia64_machine_vector { | |||
248 | platform_readl_relaxed, \ | 250 | platform_readl_relaxed, \ |
249 | platform_readq_relaxed, \ | 251 | platform_readq_relaxed, \ |
250 | platform_migrate, \ | 252 | platform_migrate, \ |
253 | platform_msi_init, \ | ||
251 | } | 254 | } |
252 | 255 | ||
253 | extern struct ia64_machine_vector ia64_mv; | 256 | extern struct ia64_machine_vector ia64_mv; |
@@ -401,5 +404,8 @@ extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size | |||
401 | #ifndef platform_migrate | 404 | #ifndef platform_migrate |
402 | # define platform_migrate machvec_noop_task | 405 | # define platform_migrate machvec_noop_task |
403 | #endif | 406 | #endif |
407 | #ifndef platform_msi_init | ||
408 | # define platform_msi_init ((ia64_mv_msi_init_t*)NULL) | ||
409 | #endif | ||
404 | 410 | ||
405 | #endif /* _ASM_IA64_MACHVEC_H */ | 411 | #endif /* _ASM_IA64_MACHVEC_H */ |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index da1d43755afe..cf724dc79d8c 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -67,6 +67,8 @@ extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; | |||
67 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; | 67 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; |
68 | extern ia64_mv_dma_supported sn_dma_supported; | 68 | extern ia64_mv_dma_supported sn_dma_supported; |
69 | extern ia64_mv_migrate_t sn_migrate; | 69 | extern ia64_mv_migrate_t sn_migrate; |
70 | extern ia64_mv_msi_init_t sn_msi_init; | ||
71 | |||
70 | 72 | ||
71 | /* | 73 | /* |
72 | * This stuff has dual use! | 74 | * This stuff has dual use! |
@@ -117,6 +119,11 @@ extern ia64_mv_migrate_t sn_migrate; | |||
117 | #define platform_dma_mapping_error sn_dma_mapping_error | 119 | #define platform_dma_mapping_error sn_dma_mapping_error |
118 | #define platform_dma_supported sn_dma_supported | 120 | #define platform_dma_supported sn_dma_supported |
119 | #define platform_migrate sn_migrate | 121 | #define platform_migrate sn_migrate |
122 | #ifdef CONFIG_PCI_MSI | ||
123 | #define platform_msi_init sn_msi_init | ||
124 | #else | ||
125 | #define platform_msi_init ((ia64_mv_msi_init_t*)NULL) | ||
126 | #endif | ||
120 | 127 | ||
121 | #include <asm/sn/io.h> | 128 | #include <asm/sn/io.h> |
122 | 129 | ||
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index 9c5389b7e623..ee97f7c2d462 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
@@ -69,14 +69,16 @@ typedef struct ia64_mc_info_s { | |||
69 | */ | 69 | */ |
70 | 70 | ||
71 | struct ia64_sal_os_state { | 71 | struct ia64_sal_os_state { |
72 | /* SAL to OS, must be at offset 0 */ | 72 | |
73 | /* SAL to OS */ | ||
73 | u64 os_gp; /* GP of the os registered with the SAL, physical */ | 74 | u64 os_gp; /* GP of the os registered with the SAL, physical */ |
74 | u64 pal_proc; /* PAL_PROC entry point, physical */ | 75 | u64 pal_proc; /* PAL_PROC entry point, physical */ |
75 | u64 sal_proc; /* SAL_PROC entry point, physical */ | 76 | u64 sal_proc; /* SAL_PROC entry point, physical */ |
76 | u64 rv_rc; /* MCA - Rendezvous state, INIT - reason code */ | 77 | u64 rv_rc; /* MCA - Rendezvous state, INIT - reason code */ |
77 | u64 proc_state_param; /* from R18 */ | 78 | u64 proc_state_param; /* from R18 */ |
78 | u64 monarch; /* 1 for a monarch event, 0 for a slave */ | 79 | u64 monarch; /* 1 for a monarch event, 0 for a slave */ |
79 | /* common, must follow SAL to OS */ | 80 | |
81 | /* common */ | ||
80 | u64 sal_ra; /* Return address in SAL, physical */ | 82 | u64 sal_ra; /* Return address in SAL, physical */ |
81 | u64 sal_gp; /* GP of the SAL - physical */ | 83 | u64 sal_gp; /* GP of the SAL - physical */ |
82 | pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ | 84 | pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ |
@@ -98,7 +100,8 @@ struct ia64_sal_os_state { | |||
98 | u64 iipa; | 100 | u64 iipa; |
99 | u64 iim; | 101 | u64 iim; |
100 | u64 iha; | 102 | u64 iha; |
101 | /* OS to SAL, must follow common */ | 103 | |
104 | /* OS to SAL */ | ||
102 | u64 os_status; /* OS status to SAL, enum below */ | 105 | u64 os_status; /* OS status to SAL, enum below */ |
103 | u64 context; /* 0 if return to same context | 106 | u64 context; /* 0 if return to same context |
104 | 1 if return to new context */ | 107 | 1 if return to new context */ |
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 46501b01a5c5..6a33a07b3f1d 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -7,7 +7,6 @@ | |||
7 | * for more details. | 7 | * for more details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | 10 | ||
12 | /* | 11 | /* |
13 | * Entries defined so far: | 12 | * Entries defined so far: |
@@ -57,6 +56,11 @@ extern void efi_memmap_init(unsigned long *, unsigned long *); | |||
57 | extern struct page *vmem_map; | 56 | extern struct page *vmem_map; |
58 | extern int find_largest_hole (u64 start, u64 end, void *arg); | 57 | extern int find_largest_hole (u64 start, u64 end, void *arg); |
59 | extern int create_mem_map_page_table (u64 start, u64 end, void *arg); | 58 | extern int create_mem_map_page_table (u64 start, u64 end, void *arg); |
59 | extern int vmemmap_find_next_valid_pfn(int, int); | ||
60 | #else | ||
61 | static inline int vmemmap_find_next_valid_pfn(int node, int i) | ||
62 | { | ||
63 | return i + 1; | ||
64 | } | ||
60 | #endif | 65 | #endif |
61 | |||
62 | #endif /* meminit_h */ | 66 | #endif /* meminit_h */ |
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index 6ba179f12718..c73b87832a1e 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h | |||
@@ -22,4 +22,12 @@ | |||
22 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
23 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
24 | 24 | ||
25 | #ifdef __KERNEL__ | ||
26 | #ifndef __ASSEMBLY__ | ||
27 | #define arch_mmap_check ia64_mmap_check | ||
28 | int ia64_mmap_check(unsigned long addr, unsigned long len, | ||
29 | unsigned long flags); | ||
30 | #endif | ||
31 | #endif | ||
32 | |||
25 | #endif /* _ASM_IA64_MMAN_H */ | 33 | #endif /* _ASM_IA64_MMAN_H */ |
diff --git a/include/asm-ia64/msi.h b/include/asm-ia64/msi.h index 97890f7762b3..bb92b0dbde2f 100644 --- a/include/asm-ia64/msi.h +++ b/include/asm-ia64/msi.h | |||
@@ -14,4 +14,16 @@ static inline void set_intr_gate (int nr, void *func) {} | |||
14 | #define ack_APIC_irq ia64_eoi | 14 | #define ack_APIC_irq ia64_eoi |
15 | #define MSI_TARGET_CPU_SHIFT 4 | 15 | #define MSI_TARGET_CPU_SHIFT 4 |
16 | 16 | ||
17 | extern struct msi_ops msi_apic_ops; | ||
18 | |||
19 | static inline int msi_arch_init(void) | ||
20 | { | ||
21 | if (platform_msi_init) | ||
22 | return platform_msi_init(); | ||
23 | |||
24 | /* default ops for most ia64 platforms */ | ||
25 | msi_register(&msi_apic_ops); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
17 | #endif /* ASM_MSI_H */ | 29 | #endif /* ASM_MSI_H */ |
diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index 9978c7ce7549..2fb337b0e9b7 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _ASM_IA64_NODEDATA_H | 11 | #ifndef _ASM_IA64_NODEDATA_H |
12 | #define _ASM_IA64_NODEDATA_H | 12 | #define _ASM_IA64_NODEDATA_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/numa.h> | 14 | #include <linux/numa.h> |
16 | 15 | ||
17 | #include <asm/percpu.h> | 16 | #include <asm/percpu.h> |
@@ -47,6 +46,18 @@ struct ia64_node_data { | |||
47 | */ | 46 | */ |
48 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) | 47 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) |
49 | 48 | ||
49 | /* | ||
50 | * LOCAL_DATA_ADDR - This is to calculate the address of other node's | ||
51 | * "local_node_data" at hot-plug phase. The local_node_data | ||
52 | * is pointed by per_cpu_page. Kernel usually use it for | ||
53 | * just executing cpu. However, when new node is hot-added, | ||
54 | * the addresses of local data for other nodes are necessary | ||
55 | * to update all of them. | ||
56 | */ | ||
57 | #define LOCAL_DATA_ADDR(pgdat) \ | ||
58 | ((struct ia64_node_data *)((u64)(pgdat) + \ | ||
59 | L1_CACHE_ALIGN(sizeof(struct pglist_data)))) | ||
60 | |||
50 | #endif /* CONFIG_NUMA */ | 61 | #endif /* CONFIG_NUMA */ |
51 | 62 | ||
52 | #endif /* _ASM_IA64_NODEDATA_H */ | 63 | #endif /* _ASM_IA64_NODEDATA_H */ |
diff --git a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h index dae6aeb7b119..e5a8260593a5 100644 --- a/include/asm-ia64/numa.h +++ b/include/asm-ia64/numa.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _ASM_IA64_NUMA_H | 11 | #ifndef _ASM_IA64_NUMA_H |
12 | #define _ASM_IA64_NUMA_H | 12 | #define _ASM_IA64_NUMA_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | 14 | ||
16 | #ifdef CONFIG_NUMA | 15 | #ifdef CONFIG_NUMA |
17 | 16 | ||
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 2087825eefa4..947cb72b520e 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * David Mosberger-Tang <davidm@hpl.hp.com> | 7 | * David Mosberger-Tang <davidm@hpl.hp.com> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | 10 | # ifdef __KERNEL__ |
11 | 11 | ||
12 | #include <asm/intrinsics.h> | 12 | #include <asm/intrinsics.h> |
13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
@@ -65,7 +65,6 @@ | |||
65 | # define __pa(x) ((x) - PAGE_OFFSET) | 65 | # define __pa(x) ((x) - PAGE_OFFSET) |
66 | # define __va(x) ((x) + PAGE_OFFSET) | 66 | # define __va(x) ((x) + PAGE_OFFSET) |
67 | #else /* !__ASSEMBLY */ | 67 | #else /* !__ASSEMBLY */ |
68 | # ifdef __KERNEL__ | ||
69 | # define STRICT_MM_TYPECHECKS | 68 | # define STRICT_MM_TYPECHECKS |
70 | 69 | ||
71 | extern void clear_page (void *page); | 70 | extern void clear_page (void *page); |
@@ -175,7 +174,6 @@ get_order (unsigned long size) | |||
175 | return order; | 174 | return order; |
176 | } | 175 | } |
177 | 176 | ||
178 | # endif /* __KERNEL__ */ | ||
179 | #endif /* !__ASSEMBLY__ */ | 177 | #endif /* !__ASSEMBLY__ */ |
180 | 178 | ||
181 | #ifdef STRICT_MM_TYPECHECKS | 179 | #ifdef STRICT_MM_TYPECHECKS |
@@ -229,4 +227,5 @@ get_order (unsigned long size) | |||
229 | (((current->personality & READ_IMPLIES_EXEC) != 0) \ | 227 | (((current->personality & READ_IMPLIES_EXEC) != 0) \ |
230 | ? VM_EXEC : 0)) | 228 | ? VM_EXEC : 0)) |
231 | 229 | ||
230 | # endif /* __KERNEL__ */ | ||
232 | #endif /* _ASM_IA64_PAGE_H */ | 231 | #endif /* _ASM_IA64_PAGE_H */ |
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 312109d7be97..d1587e4f5759 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -1443,7 +1443,12 @@ typedef union pal_version_u { | |||
1443 | } pal_version_u_t; | 1443 | } pal_version_u_t; |
1444 | 1444 | ||
1445 | 1445 | ||
1446 | /* Return PAL version information */ | 1446 | /* |
1447 | * Return PAL version information. While the documentation states that | ||
1448 | * PAL_VERSION can be called in either physical or virtual mode, some | ||
1449 | * implementations only allow physical calls. We don't call it very often, | ||
1450 | * so the overhead isn't worth eliminating. | ||
1451 | */ | ||
1447 | static inline s64 | 1452 | static inline s64 |
1448 | ia64_pal_version (pal_version_u_t *pal_min_version, pal_version_u_t *pal_cur_version) | 1453 | ia64_pal_version (pal_version_u_t *pal_min_version, pal_version_u_t *pal_cur_version) |
1449 | { | 1454 | { |
diff --git a/include/asm-ia64/param.h b/include/asm-ia64/param.h index 5e1e0d2d7baf..49c62dd5eccf 100644 --- a/include/asm-ia64/param.h +++ b/include/asm-ia64/param.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | 19 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ |
20 | 20 | ||
21 | #ifdef __KERNEL__ | 21 | #ifdef __KERNEL__ |
22 | # include <linux/config.h> /* mustn't include <linux/config.h> outside of #ifdef __KERNEL__ */ | ||
23 | # ifdef CONFIG_IA64_HP_SIM | 22 | # ifdef CONFIG_IA64_HP_SIM |
24 | /* | 23 | /* |
25 | * Yeah, simulating stuff is slow, so let us catch some breath between | 24 | * Yeah, simulating stuff is slow, so let us catch some breath between |
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h index 2b14dee29ce7..fbe5cf3ab8dc 100644 --- a/include/asm-ia64/percpu.h +++ b/include/asm-ia64/percpu.h | |||
@@ -12,7 +12,6 @@ | |||
12 | # define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ | 12 | # define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ |
13 | #else /* !__ASSEMBLY__ */ | 13 | #else /* !__ASSEMBLY__ */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
18 | 17 | ||
@@ -37,12 +36,14 @@ | |||
37 | #ifdef CONFIG_SMP | 36 | #ifdef CONFIG_SMP |
38 | 37 | ||
39 | extern unsigned long __per_cpu_offset[NR_CPUS]; | 38 | extern unsigned long __per_cpu_offset[NR_CPUS]; |
39 | #define per_cpu_offset(x) (__per_cpu_offset(x)) | ||
40 | 40 | ||
41 | /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ | 41 | /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ |
42 | DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); | 42 | DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); |
43 | 43 | ||
44 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) | 44 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) |
45 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) | 45 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) |
46 | #define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) | ||
46 | 47 | ||
47 | extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size); | 48 | extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size); |
48 | extern void setup_per_cpu_areas (void); | 49 | extern void setup_per_cpu_areas (void); |
@@ -52,6 +53,7 @@ extern void *per_cpu_init(void); | |||
52 | 53 | ||
53 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) | 54 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) |
54 | #define __get_cpu_var(var) per_cpu__##var | 55 | #define __get_cpu_var(var) per_cpu__##var |
56 | #define __raw_get_cpu_var(var) per_cpu__##var | ||
55 | #define per_cpu_init() (__phys_per_cpu_start) | 57 | #define per_cpu_init() (__phys_per_cpu_start) |
56 | 58 | ||
57 | #endif /* SMP */ | 59 | #endif /* SMP */ |
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h index f2f233846476..9cb68e9b377e 100644 --- a/include/asm-ia64/pgalloc.h +++ b/include/asm-ia64/pgalloc.h | |||
@@ -13,7 +13,6 @@ | |||
13 | * Copyright (C) 2000, Goutham Rao <goutham.rao@intel.com> | 13 | * Copyright (C) 2000, Goutham Rao <goutham.rao@intel.com> |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index c0f8144f2349..228981cadf8f 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -12,7 +12,6 @@ | |||
12 | * David Mosberger-Tang <davidm@hpl.hp.com> | 12 | * David Mosberger-Tang <davidm@hpl.hp.com> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | #include <asm/mman.h> | 16 | #include <asm/mman.h> |
18 | #include <asm/page.h> | 17 | #include <asm/page.h> |
@@ -317,22 +316,20 @@ ia64_phys_addr_valid (unsigned long addr) | |||
317 | #define pte_mkhuge(pte) (__pte(pte_val(pte))) | 316 | #define pte_mkhuge(pte) (__pte(pte_val(pte))) |
318 | 317 | ||
319 | /* | 318 | /* |
320 | * Macro to a page protection value as "uncacheable". Note that "protection" is really a | 319 | * Make page protection values cacheable, uncacheable, or write- |
321 | * misnomer here as the protection value contains the memory attribute bits, dirty bits, | 320 | * combining. Note that "protection" is really a misnomer here as the |
322 | * and various other bits as well. | 321 | * protection value contains the memory attribute bits, dirty bits, and |
322 | * various other bits as well. | ||
323 | */ | 323 | */ |
324 | #define pgprot_cacheable(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WB) | ||
324 | #define pgprot_noncached(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_UC) | 325 | #define pgprot_noncached(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_UC) |
325 | |||
326 | /* | ||
327 | * Macro to make mark a page protection value as "write-combining". | ||
328 | * Note that "protection" is really a misnomer here as the protection | ||
329 | * value contains the memory attribute bits, dirty bits, and various | ||
330 | * other bits as well. Accesses through a write-combining translation | ||
331 | * works bypasses the caches, but does allow for consecutive writes to | ||
332 | * be combined into single (but larger) write transactions. | ||
333 | */ | ||
334 | #define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) | 326 | #define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) |
335 | 327 | ||
328 | struct file; | ||
329 | extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | ||
330 | unsigned long size, pgprot_t vma_prot); | ||
331 | #define __HAVE_PHYS_MEM_ACCESS_PROT | ||
332 | |||
336 | static inline unsigned long | 333 | static inline unsigned long |
337 | pgd_index (unsigned long address) | 334 | pgd_index (unsigned long address) |
338 | { | 335 | { |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 03100c4272c6..ead68f8eb883 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -13,7 +13,6 @@ | |||
13 | * 06/16/00 A. Mallick added csd/ssd/tssd for ia32 support | 13 | * 06/16/00 A. Mallick added csd/ssd/tssd for ia32 support |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #include <asm/intrinsics.h> | 17 | #include <asm/intrinsics.h> |
19 | #include <asm/kregs.h> | 18 | #include <asm/kregs.h> |
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 9471cdc3f4c0..1414316efd40 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -54,9 +54,10 @@ | |||
54 | * This is because ar.ec is saved as part of ar.pfs. | 54 | * This is because ar.ec is saved as part of ar.pfs. |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | 57 | ||
59 | #include <asm/fpu.h> | 58 | #include <asm/fpu.h> |
59 | |||
60 | #ifdef __KERNEL__ | ||
60 | #ifndef ASM_OFFSETS_C | 61 | #ifndef ASM_OFFSETS_C |
61 | #include <asm/asm-offsets.h> | 62 | #include <asm/asm-offsets.h> |
62 | #endif | 63 | #endif |
@@ -80,10 +81,9 @@ | |||
80 | 81 | ||
81 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET | 82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET |
82 | 83 | ||
83 | #ifndef __ASSEMBLY__ | 84 | #endif /* __KERNEL__ */ |
84 | 85 | ||
85 | #include <asm/current.h> | 86 | #ifndef __ASSEMBLY__ |
86 | #include <asm/page.h> | ||
87 | 87 | ||
88 | /* | 88 | /* |
89 | * This struct defines the way the registers are saved on system | 89 | * This struct defines the way the registers are saved on system |
@@ -230,6 +230,9 @@ struct switch_stack { | |||
230 | 230 | ||
231 | #ifdef __KERNEL__ | 231 | #ifdef __KERNEL__ |
232 | 232 | ||
233 | #include <asm/current.h> | ||
234 | #include <asm/page.h> | ||
235 | |||
233 | #define __ARCH_SYS_PTRACE 1 | 236 | #define __ARCH_SYS_PTRACE 1 |
234 | 237 | ||
235 | /* | 238 | /* |
diff --git a/include/asm-ia64/rwsem.h b/include/asm-ia64/rwsem.h index 1327c91ea39c..2d1640cc240a 100644 --- a/include/asm-ia64/rwsem.h +++ b/include/asm-ia64/rwsem.h | |||
@@ -33,9 +33,6 @@ struct rw_semaphore { | |||
33 | signed long count; | 33 | signed long count; |
34 | spinlock_t wait_lock; | 34 | spinlock_t wait_lock; |
35 | struct list_head wait_list; | 35 | struct list_head wait_list; |
36 | #if RWSEM_DEBUG | ||
37 | int debug; | ||
38 | #endif | ||
39 | }; | 36 | }; |
40 | 37 | ||
41 | #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) | 38 | #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) |
@@ -45,19 +42,9 @@ struct rw_semaphore { | |||
45 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 42 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
46 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 43 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
47 | 44 | ||
48 | /* | ||
49 | * initialization | ||
50 | */ | ||
51 | #if RWSEM_DEBUG | ||
52 | #define __RWSEM_DEBUG_INIT , 0 | ||
53 | #else | ||
54 | #define __RWSEM_DEBUG_INIT /* */ | ||
55 | #endif | ||
56 | |||
57 | #define __RWSEM_INITIALIZER(name) \ | 45 | #define __RWSEM_INITIALIZER(name) \ |
58 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ | 46 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ |
59 | LIST_HEAD_INIT((name).wait_list) \ | 47 | LIST_HEAD_INIT((name).wait_list) } |
60 | __RWSEM_DEBUG_INIT } | ||
61 | 48 | ||
62 | #define DECLARE_RWSEM(name) \ | 49 | #define DECLARE_RWSEM(name) \ |
63 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 50 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
@@ -73,9 +60,6 @@ init_rwsem (struct rw_semaphore *sem) | |||
73 | sem->count = RWSEM_UNLOCKED_VALUE; | 60 | sem->count = RWSEM_UNLOCKED_VALUE; |
74 | spin_lock_init(&sem->wait_lock); | 61 | spin_lock_init(&sem->wait_lock); |
75 | INIT_LIST_HEAD(&sem->wait_list); | 62 | INIT_LIST_HEAD(&sem->wait_list); |
76 | #if RWSEM_DEBUG | ||
77 | sem->debug = 0; | ||
78 | #endif | ||
79 | } | 63 | } |
80 | 64 | ||
81 | /* | 65 | /* |
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h index 5e328ed5d01d..4f5ca5643cb1 100644 --- a/include/asm-ia64/signal.h +++ b/include/asm-ia64/signal.h | |||
@@ -56,7 +56,6 @@ | |||
56 | * SA_FLAGS values: | 56 | * SA_FLAGS values: |
57 | * | 57 | * |
58 | * SA_ONSTACK indicates that a registered stack_t will be used. | 58 | * SA_ONSTACK indicates that a registered stack_t will be used. |
59 | * SA_INTERRUPT is a no-op, but left due to historical reasons. | ||
60 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 59 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
61 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 60 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
62 | * SA_RESETHAND clears the handler when the signal is delivered. | 61 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -76,7 +75,6 @@ | |||
76 | 75 | ||
77 | #define SA_NOMASK SA_NODEFER | 76 | #define SA_NOMASK SA_NODEFER |
78 | #define SA_ONESHOT SA_RESETHAND | 77 | #define SA_ONESHOT SA_RESETHAND |
79 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
80 | 78 | ||
81 | #define SA_RESTORER 0x04000000 | 79 | #define SA_RESTORER 0x04000000 |
82 | 80 | ||
@@ -114,8 +112,6 @@ | |||
114 | #define _NSIG_BPW 64 | 112 | #define _NSIG_BPW 64 |
115 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 113 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
116 | 114 | ||
117 | #define SA_PERCPU_IRQ 0x02000000 | ||
118 | |||
119 | #endif /* __KERNEL__ */ | 115 | #endif /* __KERNEL__ */ |
120 | 116 | ||
121 | #include <asm-generic/signal.h> | 117 | #include <asm-generic/signal.h> |
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index a3914352c995..719ff309ce09 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _ASM_IA64_SMP_H | 10 | #ifndef _ASM_IA64_SMP_H |
11 | #define _ASM_IA64_SMP_H | 11 | #define _ASM_IA64_SMP_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/threads.h> | 14 | #include <linux/threads.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index 60a51a406eec..12b54ddb06be 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define _ASM_IA64_SN_INTR_H | 10 | #define _ASM_IA64_SN_INTR_H |
11 | 11 | ||
12 | #include <linux/rcupdate.h> | 12 | #include <linux/rcupdate.h> |
13 | #include <asm/sn/types.h> | ||
13 | 14 | ||
14 | #define SGI_UART_VECTOR 0xe9 | 15 | #define SGI_UART_VECTOR 0xe9 |
15 | 16 | ||
@@ -40,6 +41,7 @@ struct sn_irq_info { | |||
40 | int irq_cpuid; /* kernel logical cpuid */ | 41 | int irq_cpuid; /* kernel logical cpuid */ |
41 | int irq_irq; /* the IRQ number */ | 42 | int irq_irq; /* the IRQ number */ |
42 | int irq_int_bit; /* Bridge interrupt pin */ | 43 | int irq_int_bit; /* Bridge interrupt pin */ |
44 | /* <0 means MSI */ | ||
43 | u64 irq_xtalkaddr; /* xtalkaddr IRQ is sent to */ | 45 | u64 irq_xtalkaddr; /* xtalkaddr IRQ is sent to */ |
44 | int irq_bridge_type;/* pciio asic type (pciio.h) */ | 46 | int irq_bridge_type;/* pciio asic type (pciio.h) */ |
45 | void *irq_bridge; /* bridge generating irq */ | 47 | void *irq_bridge; /* bridge generating irq */ |
@@ -53,6 +55,12 @@ struct sn_irq_info { | |||
53 | }; | 55 | }; |
54 | 56 | ||
55 | extern void sn_send_IPI_phys(int, long, int, int); | 57 | extern void sn_send_IPI_phys(int, long, int, int); |
58 | extern u64 sn_intr_alloc(nasid_t, int, | ||
59 | struct sn_irq_info *, | ||
60 | int, nasid_t, int); | ||
61 | extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); | ||
62 | extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); | ||
63 | extern struct list_head **sn_irq_lh; | ||
56 | 64 | ||
57 | #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) | 65 | #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) |
58 | 66 | ||
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h index 51260ab70d91..e3b0c3fe5eed 100644 --- a/include/asm-ia64/sn/pcibr_provider.h +++ b/include/asm-ia64/sn/pcibr_provider.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #define PCI32_ATE_V (0x1 << 0) | 55 | #define PCI32_ATE_V (0x1 << 0) |
56 | #define PCI32_ATE_CO (0x1 << 1) | 56 | #define PCI32_ATE_CO (0x1 << 1) |
57 | #define PCI32_ATE_PREC (0x1 << 2) | 57 | #define PCI32_ATE_PREC (0x1 << 2) |
58 | #define PCI32_ATE_MSI (0x1 << 2) | ||
58 | #define PCI32_ATE_PREF (0x1 << 3) | 59 | #define PCI32_ATE_PREF (0x1 << 3) |
59 | #define PCI32_ATE_BAR (0x1 << 4) | 60 | #define PCI32_ATE_BAR (0x1 << 4) |
60 | #define PCI32_ATE_ADDR_SHFT 12 | 61 | #define PCI32_ATE_ADDR_SHFT 12 |
@@ -117,8 +118,8 @@ struct pcibus_info { | |||
117 | 118 | ||
118 | extern int pcibr_init_provider(void); | 119 | extern int pcibr_init_provider(void); |
119 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); | 120 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); |
120 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | 121 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t, int type); |
121 | extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t); | 122 | extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t, int type); |
122 | extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); | 123 | extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); |
123 | 124 | ||
124 | /* | 125 | /* |
diff --git a/include/asm-ia64/sn/pcibus_provider_defs.h b/include/asm-ia64/sn/pcibus_provider_defs.h index ce3f6c328241..8f7c83d0f6d3 100644 --- a/include/asm-ia64/sn/pcibus_provider_defs.h +++ b/include/asm-ia64/sn/pcibus_provider_defs.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H | 8 | #ifndef _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H |
9 | #define _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H | 9 | #define _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H |
@@ -45,13 +45,24 @@ struct pci_controller; | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | struct sn_pcibus_provider { | 47 | struct sn_pcibus_provider { |
48 | dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t); | 48 | dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t, int flags); |
49 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); | 49 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t, int flags); |
50 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); | 50 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); |
51 | void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); | 51 | void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); |
52 | void (*force_interrupt)(struct sn_irq_info *); | 52 | void (*force_interrupt)(struct sn_irq_info *); |
53 | void (*target_interrupt)(struct sn_irq_info *); | 53 | void (*target_interrupt)(struct sn_irq_info *); |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* | ||
57 | * Flags used by the map interfaces | ||
58 | * bits 3:0 specifies format of passed in address | ||
59 | * bit 4 specifies that address is to be used for MSI | ||
60 | */ | ||
61 | |||
62 | #define SN_DMA_ADDRTYPE(x) ((x) & 0xf) | ||
63 | #define SN_DMA_ADDR_PHYS 1 /* address is an xio address. */ | ||
64 | #define SN_DMA_ADDR_XIO 2 /* address is phys memory */ | ||
65 | #define SN_DMA_MSI 0x10 /* Bus address is to be used for MSI */ | ||
66 | |||
56 | extern struct sn_pcibus_provider *sn_pci_provider[]; | 67 | extern struct sn_pcibus_provider *sn_pci_provider[]; |
57 | #endif /* _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H */ | 68 | #endif /* _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H */ |
diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h index 16a48b5a039c..c3fd3eb25768 100644 --- a/include/asm-ia64/sn/simulator.h +++ b/include/asm-ia64/sn/simulator.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #ifndef _ASM_IA64_SN_SIMULATOR_H | 8 | #ifndef _ASM_IA64_SN_SIMULATOR_H |
9 | #define _ASM_IA64_SN_SIMULATOR_H | 9 | #define _ASM_IA64_SN_SIMULATOR_H |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | 11 | ||
13 | #define SNMAGIC 0xaeeeeeee8badbeefL | 12 | #define SNMAGIC 0xaeeeeeee8badbeefL |
14 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) | 13 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) |
diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h index 749deb2ca6c1..a676dd9ace3e 100644 --- a/include/asm-ia64/sn/sn_cpuid.h +++ b/include/asm-ia64/sn/sn_cpuid.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _ASM_IA64_SN_SN_CPUID_H | 11 | #ifndef _ASM_IA64_SN_SN_CPUID_H |
12 | #define _ASM_IA64_SN_SN_CPUID_H | 12 | #define _ASM_IA64_SN_SN_CPUID_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
16 | #include <asm/sn/addrs.h> | 15 | #include <asm/sn/addrs.h> |
17 | #include <asm/sn/pda.h> | 16 | #include <asm/sn/pda.h> |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 51aca022cf39..ba826b3f75bb 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <asm/sal.h> | 15 | #include <asm/sal.h> |
17 | #include <asm/sn/sn_cpuid.h> | 16 | #include <asm/sn/sn_cpuid.h> |
18 | #include <asm/sn/arch.h> | 17 | #include <asm/sn/arch.h> |
@@ -86,6 +85,7 @@ | |||
86 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 | 85 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 |
87 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 | 86 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 |
88 | #define SN_SAL_INJECT_ERROR 0x02000067 | 87 | #define SN_SAL_INJECT_ERROR 0x02000067 |
88 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 | ||
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Service-specific constants | 91 | * Service-specific constants |
@@ -346,7 +346,7 @@ ia64_sn_plat_set_error_handling_features(void) | |||
346 | ret_stuff.v1 = 0; | 346 | ret_stuff.v1 = 0; |
347 | ret_stuff.v2 = 0; | 347 | ret_stuff.v2 = 0; |
348 | SAL_CALL_REENTRANT(ret_stuff, SN_SAL_SET_ERROR_HANDLING_FEATURES, | 348 | SAL_CALL_REENTRANT(ret_stuff, SN_SAL_SET_ERROR_HANDLING_FEATURES, |
349 | (SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV | SAL_ERR_FEAT_LOG_SBES), | 349 | SAL_ERR_FEAT_LOG_SBES, |
350 | 0, 0, 0, 0, 0, 0); | 350 | 0, 0, 0, 0, 0, 0); |
351 | 351 | ||
352 | return ret_stuff.status; | 352 | return ret_stuff.status; |
@@ -706,12 +706,9 @@ static inline int | |||
706 | sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) | 706 | sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) |
707 | { | 707 | { |
708 | struct ia64_sal_retval ret_stuff; | 708 | struct ia64_sal_retval ret_stuff; |
709 | unsigned long irq_flags; | ||
710 | 709 | ||
711 | local_irq_save(irq_flags); | ||
712 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, | 710 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, |
713 | (u64)nasid_array, perms, 0, 0, 0); | 711 | (u64)nasid_array, perms, 0, 0, 0); |
714 | local_irq_restore(irq_flags); | ||
715 | return ret_stuff.status; | 712 | return ret_stuff.status; |
716 | } | 713 | } |
717 | #define SN_MEMPROT_ACCESS_CLASS_0 0x14a080 | 714 | #define SN_MEMPROT_ACCESS_CLASS_0 0x14a080 |
@@ -1143,12 +1140,18 @@ static inline int | |||
1143 | sn_inject_error(u64 paddr, u64 *data, u64 *ecc) | 1140 | sn_inject_error(u64 paddr, u64 *data, u64 *ecc) |
1144 | { | 1141 | { |
1145 | struct ia64_sal_retval ret_stuff; | 1142 | struct ia64_sal_retval ret_stuff; |
1146 | unsigned long irq_flags; | ||
1147 | 1143 | ||
1148 | local_irq_save(irq_flags); | ||
1149 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data, | 1144 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data, |
1150 | (u64)ecc, 0, 0, 0, 0); | 1145 | (u64)ecc, 0, 0, 0, 0); |
1151 | local_irq_restore(irq_flags); | ||
1152 | return ret_stuff.status; | 1146 | return ret_stuff.status; |
1153 | } | 1147 | } |
1148 | |||
1149 | static inline int | ||
1150 | ia64_sn_set_cpu_number(int cpu) | ||
1151 | { | ||
1152 | struct ia64_sal_retval rv; | ||
1153 | |||
1154 | SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0); | ||
1155 | return rv.status; | ||
1156 | } | ||
1154 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1157 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h index ab7fe2463468..65cdd73c2a57 100644 --- a/include/asm-ia64/sn/tioca_provider.h +++ b/include/asm-ia64/sn/tioca_provider.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define PV908234 (1 << 1) | 27 | #define PV908234 (1 << 1) |
28 | /* CA:AGPDMA write request data mismatch with ABC1CL merge */ | 28 | /* CA:AGPDMA write request data mismatch with ABC1CL merge */ |
29 | #define PV895469 (1 << 1) | 29 | #define PV895469 (1 << 1) |
30 | /* TIO:CA TLB invalidate of written GART entries possibly not occuring in CA*/ | 30 | /* TIO:CA TLB invalidate of written GART entries possibly not occurring in CA*/ |
31 | #define PV910244 (1 << 1) | 31 | #define PV910244 (1 << 1) |
32 | 32 | ||
33 | struct tioca_dmamap{ | 33 | struct tioca_dmamap{ |
diff --git a/include/asm-ia64/sn/tiocp.h b/include/asm-ia64/sn/tiocp.h index f47c08ab483c..e8ad0bb5b6c5 100644 --- a/include/asm-ia64/sn/tiocp.h +++ b/include/asm-ia64/sn/tiocp.h | |||
@@ -3,13 +3,14 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 2003-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_TIOCP_H | 8 | #ifndef _ASM_IA64_SN_PCI_TIOCP_H |
9 | #define _ASM_IA64_SN_PCI_TIOCP_H | 9 | #define _ASM_IA64_SN_PCI_TIOCP_H |
10 | 10 | ||
11 | #define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL | 11 | #define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL |
12 | #define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60) | 12 | #define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60) |
13 | #define TIOCP_PCI64_CMDTYPE_MSI (0x3ull << 60) | ||
13 | 14 | ||
14 | 15 | ||
15 | /***************************************************************************** | 16 | /***************************************************************************** |
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h index 9bd2f9bf329b..6f807e0193b7 100644 --- a/include/asm-ia64/sn/xp.h +++ b/include/asm-ia64/sn/xp.h | |||
@@ -60,23 +60,37 @@ | |||
60 | * the bte_copy() once in the hope that the failure was due to a temporary | 60 | * the bte_copy() once in the hope that the failure was due to a temporary |
61 | * aberration (i.e., the link going down temporarily). | 61 | * aberration (i.e., the link going down temporarily). |
62 | * | 62 | * |
63 | * See bte_copy for definition of the input parameters. | 63 | * src - physical address of the source of the transfer. |
64 | * vdst - virtual address of the destination of the transfer. | ||
65 | * len - number of bytes to transfer from source to destination. | ||
66 | * mode - see bte_copy() for definition. | ||
67 | * notification - see bte_copy() for definition. | ||
64 | * | 68 | * |
65 | * Note: xp_bte_copy() should never be called while holding a spinlock. | 69 | * Note: xp_bte_copy() should never be called while holding a spinlock. |
66 | */ | 70 | */ |
67 | static inline bte_result_t | 71 | static inline bte_result_t |
68 | xp_bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) | 72 | xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification) |
69 | { | 73 | { |
70 | bte_result_t ret; | 74 | bte_result_t ret; |
75 | u64 pdst = ia64_tpa(vdst); | ||
71 | 76 | ||
72 | 77 | ||
73 | ret = bte_copy(src, dest, len, mode, notification); | 78 | /* |
79 | * Ensure that the physically mapped memory is contiguous. | ||
80 | * | ||
81 | * We do this by ensuring that the memory is from region 7 only. | ||
82 | * If the need should arise to use memory from one of the other | ||
83 | * regions, then modify the BUG_ON() statement to ensure that the | ||
84 | * memory from that region is always physically contiguous. | ||
85 | */ | ||
86 | BUG_ON(REGION_NUMBER(vdst) != RGN_KERNEL); | ||
74 | 87 | ||
88 | ret = bte_copy(src, pdst, len, mode, notification); | ||
75 | if (ret != BTE_SUCCESS) { | 89 | if (ret != BTE_SUCCESS) { |
76 | if (!in_interrupt()) { | 90 | if (!in_interrupt()) { |
77 | cond_resched(); | 91 | cond_resched(); |
78 | } | 92 | } |
79 | ret = bte_copy(src, dest, len, mode, notification); | 93 | ret = bte_copy(src, pdst, len, mode, notification); |
80 | } | 94 | } |
81 | 95 | ||
82 | return ret; | 96 | return ret; |
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index aa3b8ace9030..35e1386f37ab 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #define _ASM_IA64_SN_XPC_H | 15 | #define _ASM_IA64_SN_XPC_H |
16 | 16 | ||
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
21 | #include <linux/device.h> | 20 | #include <linux/device.h> |
@@ -684,7 +683,9 @@ extern struct xpc_vars *xpc_vars; | |||
684 | extern struct xpc_rsvd_page *xpc_rsvd_page; | 683 | extern struct xpc_rsvd_page *xpc_rsvd_page; |
685 | extern struct xpc_vars_part *xpc_vars_part; | 684 | extern struct xpc_vars_part *xpc_vars_part; |
686 | extern struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1]; | 685 | extern struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1]; |
687 | extern char xpc_remote_copy_buffer[]; | 686 | extern char *xpc_remote_copy_buffer; |
687 | extern void *xpc_remote_copy_buffer_base; | ||
688 | extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **); | ||
688 | extern struct xpc_rsvd_page *xpc_rsvd_page_init(void); | 689 | extern struct xpc_rsvd_page *xpc_rsvd_page_init(void); |
689 | extern void xpc_allow_IPI_ops(void); | 690 | extern void xpc_allow_IPI_ops(void); |
690 | extern void xpc_restrict_IPI_ops(void); | 691 | extern void xpc_restrict_IPI_ops(void); |
@@ -1125,8 +1126,8 @@ xpc_notify_IRQ_send_local(struct xpc_channel *ch, u8 ipi_flag, | |||
1125 | #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) | 1126 | #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) |
1126 | #define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8)) | 1127 | #define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8)) |
1127 | 1128 | ||
1128 | #define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f) | 1129 | #define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & __IA64_UL_CONST(0x0f0f0f0f0f0f0f0f)) |
1129 | #define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010) | 1130 | #define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & __IA64_UL_CONST(0x1010101010101010)) |
1130 | 1131 | ||
1131 | 1132 | ||
1132 | static inline void | 1133 | static inline void |
diff --git a/include/asm-ia64/socket.h b/include/asm-ia64/socket.h index a255006fb7b5..d638ef3d50c3 100644 --- a/include/asm-ia64/socket.h +++ b/include/asm-ia64/socket.h | |||
@@ -57,5 +57,6 @@ | |||
57 | #define SO_ACCEPTCONN 30 | 57 | #define SO_ACCEPTCONN 30 |
58 | 58 | ||
59 | #define SO_PEERSEC 31 | 59 | #define SO_PEERSEC 31 |
60 | #define SO_PASSSEC 34 | ||
60 | 61 | ||
61 | #endif /* _ASM_IA64_SOCKET_H */ | 62 | #endif /* _ASM_IA64_SOCKET_H */ |
diff --git a/include/asm-ia64/string.h b/include/asm-ia64/string.h index 43502d3b57e5..85fd65c52a8c 100644 --- a/include/asm-ia64/string.h +++ b/include/asm-ia64/string.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * David Mosberger-Tang <davidm@hpl.hp.com> | 9 | * David Mosberger-Tang <davidm@hpl.hp.com> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> /* remove this once we remove the A-step workaround... */ | ||
13 | 12 | ||
14 | #define __HAVE_ARCH_STRLEN 1 /* see arch/ia64/lib/strlen.S */ | 13 | #define __HAVE_ARCH_STRLEN 1 /* see arch/ia64/lib/strlen.S */ |
15 | #define __HAVE_ARCH_MEMSET 1 /* see arch/ia64/lib/memset.S */ | 14 | #define __HAVE_ARCH_MEMSET 1 /* see arch/ia64/lib/memset.S */ |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 2f3620593687..384fbf7f2a0f 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -12,7 +12,6 @@ | |||
12 | * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com> | 12 | * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com> |
13 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> | 13 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | #include <asm/kregs.h> | 16 | #include <asm/kregs.h> |
18 | #include <asm/page.h> | 17 | #include <asm/page.h> |
@@ -25,7 +24,7 @@ | |||
25 | * 0xa000000000000000+2*PERCPU_PAGE_SIZE | 24 | * 0xa000000000000000+2*PERCPU_PAGE_SIZE |
26 | * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) | 25 | * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) |
27 | */ | 26 | */ |
28 | #define KERNEL_START (GATE_ADDR+0x100000000) | 27 | #define KERNEL_START (GATE_ADDR+__IA64_UL_CONST(0x100000000)) |
29 | #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) | 28 | #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) |
30 | 29 | ||
31 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
@@ -99,12 +98,11 @@ extern struct ia64_boot_param { | |||
99 | #endif | 98 | #endif |
100 | 99 | ||
101 | /* | 100 | /* |
102 | * XXX check on these---I suspect what Linus really wants here is | 101 | * XXX check on this ---I suspect what Linus really wants here is |
103 | * acquire vs release semantics but we can't discuss this stuff with | 102 | * acquire vs release semantics but we can't discuss this stuff with |
104 | * Linus just yet. Grrr... | 103 | * Linus just yet. Grrr... |
105 | */ | 104 | */ |
106 | #define set_mb(var, value) do { (var) = (value); mb(); } while (0) | 105 | #define set_mb(var, value) do { (var) = (value); mb(); } while (0) |
107 | #define set_wmb(var, value) do { (var) = (value); mb(); } while (0) | ||
108 | 106 | ||
109 | #define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ | 107 | #define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ |
110 | 108 | ||
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index e5392c4d30c6..8adcde0934ca 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -27,6 +27,7 @@ struct thread_info { | |||
27 | __u32 flags; /* thread_info flags (see TIF_*) */ | 27 | __u32 flags; /* thread_info flags (see TIF_*) */ |
28 | __u32 cpu; /* current CPU */ | 28 | __u32 cpu; /* current CPU */ |
29 | __u32 last_cpu; /* Last CPU thread ran on */ | 29 | __u32 last_cpu; /* Last CPU thread ran on */ |
30 | __u32 status; /* Thread synchronous flags */ | ||
30 | mm_segment_t addr_limit; /* user-level address space limit */ | 31 | mm_segment_t addr_limit; /* user-level address space limit */ |
31 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 32 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
32 | struct restart_block restart_block; | 33 | struct restart_block restart_block; |
@@ -67,7 +68,7 @@ struct thread_info { | |||
67 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) | 68 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) |
68 | 69 | ||
69 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 70 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
70 | #define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) | 71 | #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) |
71 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) | 72 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) |
72 | 73 | ||
73 | #endif /* !__ASSEMBLY */ | 74 | #endif /* !__ASSEMBLY */ |
@@ -103,4 +104,8 @@ struct thread_info { | |||
103 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ | 104 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ |
104 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 105 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
105 | 106 | ||
107 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ | ||
108 | |||
109 | #define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) | ||
110 | |||
106 | #endif /* _ASM_IA64_THREAD_INFO_H */ | 111 | #endif /* _ASM_IA64_THREAD_INFO_H */ |
diff --git a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h index 834370b9dea1..26edcb750f9f 100644 --- a/include/asm-ia64/tlb.h +++ b/include/asm-ia64/tlb.h | |||
@@ -37,7 +37,6 @@ | |||
37 | * } | 37 | * } |
38 | * tlb_finish_mmu(tlb, start, end); // finish unmap for address space MM | 38 | * tlb_finish_mmu(tlb, start, end); // finish unmap for address space MM |
39 | */ | 39 | */ |
40 | #include <linux/config.h> | ||
41 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
42 | #include <linux/pagemap.h> | 41 | #include <linux/pagemap.h> |
43 | #include <linux/swap.h> | 42 | #include <linux/swap.h> |
diff --git a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h index a35b323bae4c..cf9acb9bb1fb 100644 --- a/include/asm-ia64/tlbflush.h +++ b/include/asm-ia64/tlbflush.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
12 | 11 | ||
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 616b5ed2aa72..937c21257523 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -112,6 +112,7 @@ void build_cpu_to_node_map(void); | |||
112 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | 112 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) |
113 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 113 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
114 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 114 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
115 | #define smt_capable() (smp_num_siblings > 1) | ||
115 | #endif | 116 | #endif |
116 | 117 | ||
117 | #include <asm-generic/topology.h> | 118 | #include <asm-generic/topology.h> |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 7107763168bf..f581662c5ab8 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -265,7 +265,7 @@ | |||
265 | #define __NR_keyctl 1273 | 265 | #define __NR_keyctl 1273 |
266 | #define __NR_ioprio_set 1274 | 266 | #define __NR_ioprio_set 1274 |
267 | #define __NR_ioprio_get 1275 | 267 | #define __NR_ioprio_get 1275 |
268 | /* 1276 is available for reuse (was briefly sys_set_zone_reclaim) */ | 268 | #define __NR_move_pages 1276 |
269 | #define __NR_inotify_init 1277 | 269 | #define __NR_inotify_init 1277 |
270 | #define __NR_inotify_add_watch 1278 | 270 | #define __NR_inotify_add_watch 1278 |
271 | #define __NR_inotify_rm_watch 1279 | 271 | #define __NR_inotify_rm_watch 1279 |
@@ -286,15 +286,13 @@ | |||
286 | /* 1294, 1295 reserved for pselect/ppoll */ | 286 | /* 1294, 1295 reserved for pselect/ppoll */ |
287 | #define __NR_unshare 1296 | 287 | #define __NR_unshare 1296 |
288 | #define __NR_splice 1297 | 288 | #define __NR_splice 1297 |
289 | #define __NR_set_robust_list 1298 | 289 | /* 1298, 1299 reserved for set_robust_list/get_robust_list */ |
290 | #define __NR_get_robust_list 1299 | ||
291 | #define __NR_sync_file_range 1300 | 290 | #define __NR_sync_file_range 1300 |
292 | #define __NR_tee 1301 | 291 | #define __NR_tee 1301 |
293 | #define __NR_vmsplice 1302 | 292 | #define __NR_vmsplice 1302 |
294 | 293 | ||
295 | #ifdef __KERNEL__ | 294 | #ifdef __KERNEL__ |
296 | 295 | ||
297 | #include <linux/config.h> | ||
298 | 296 | ||
299 | #define NR_syscalls 279 /* length of syscall table */ | 297 | #define NR_syscalls 279 /* length of syscall table */ |
300 | 298 | ||
diff --git a/include/asm-ia64/ustack.h b/include/asm-ia64/ustack.h index da55c91246e3..a349467913ea 100644 --- a/include/asm-ia64/ustack.h +++ b/include/asm-ia64/ustack.h | |||
@@ -5,12 +5,15 @@ | |||
5 | * Constants for the user stack size | 5 | * Constants for the user stack size |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifdef __KERNEL__ | ||
8 | #include <asm/page.h> | 9 | #include <asm/page.h> |
9 | 10 | ||
10 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ | 11 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ |
11 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) | 12 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) |
12 | /* Make a default stack size of 2GB */ | ||
13 | #define DEFAULT_USER_STACK_SIZE (1UL << 31) | ||
14 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) | 13 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) |
14 | #endif | ||
15 | |||
16 | /* Make a default stack size of 2GiB */ | ||
17 | #define DEFAULT_USER_STACK_SIZE (1UL << 31) | ||
15 | 18 | ||
16 | #endif /* _ASM_IA64_USTACK_H */ | 19 | #endif /* _ASM_IA64_USTACK_H */ |
diff --git a/include/asm-ia64/vga.h b/include/asm-ia64/vga.h index 091177cda223..02184ecd8208 100644 --- a/include/asm-ia64/vga.h +++ b/include/asm-ia64/vga.h | |||
@@ -17,7 +17,7 @@ | |||
17 | extern unsigned long vga_console_iobase; | 17 | extern unsigned long vga_console_iobase; |
18 | extern unsigned long vga_console_membase; | 18 | extern unsigned long vga_console_membase; |
19 | 19 | ||
20 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap_nocache(vga_console_membase + (x), 0)) | 20 | #define VGA_MAP_MEM(x,s) ((unsigned long) ioremap_nocache(vga_console_membase + (x), s)) |
21 | 21 | ||
22 | #define vga_readb(x) (*(x)) | 22 | #define vga_readb(x) (*(x)) |
23 | #define vga_writeb(x,y) (*(y) = (x)) | 23 | #define vga_writeb(x,y) (*(y) = (x)) |