diff options
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/amd_iommu.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/desc.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 10 | ||||
-rw-r--r-- | arch/x86/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/topology.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/uv/uv_hub.h | 23 |
6 files changed, 33 insertions, 6 deletions
diff --git a/arch/x86/include/asm/amd_iommu.h b/arch/x86/include/asm/amd_iommu.h index ac95995b7bad..4b180897e6b5 100644 --- a/arch/x86/include/asm/amd_iommu.h +++ b/arch/x86/include/asm/amd_iommu.h | |||
@@ -31,6 +31,7 @@ extern irqreturn_t amd_iommu_int_handler(int irq, void *data); | |||
31 | extern void amd_iommu_flush_all_domains(void); | 31 | extern void amd_iommu_flush_all_domains(void); |
32 | extern void amd_iommu_flush_all_devices(void); | 32 | extern void amd_iommu_flush_all_devices(void); |
33 | extern void amd_iommu_shutdown(void); | 33 | extern void amd_iommu_shutdown(void); |
34 | extern void amd_iommu_apply_erratum_63(u16 devid); | ||
34 | #else | 35 | #else |
35 | static inline int amd_iommu_init(void) { return -ENODEV; } | 36 | static inline int amd_iommu_init(void) { return -ENODEV; } |
36 | static inline void amd_iommu_detect(void) { } | 37 | static inline void amd_iommu_detect(void) { } |
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index e8de2f6f5ca5..617bd56b3070 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h | |||
@@ -288,7 +288,7 @@ static inline void load_LDT(mm_context_t *pc) | |||
288 | 288 | ||
289 | static inline unsigned long get_desc_base(const struct desc_struct *desc) | 289 | static inline unsigned long get_desc_base(const struct desc_struct *desc) |
290 | { | 290 | { |
291 | return desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24); | 291 | return (unsigned)(desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24)); |
292 | } | 292 | } |
293 | 293 | ||
294 | static inline void set_desc_base(struct desc_struct *desc, unsigned long base) | 294 | static inline void set_desc_base(struct desc_struct *desc, unsigned long base) |
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 0ee770d23d0e..6a25d5d42836 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -14,6 +14,12 @@ | |||
14 | #include <asm/swiotlb.h> | 14 | #include <asm/swiotlb.h> |
15 | #include <asm-generic/dma-coherent.h> | 15 | #include <asm-generic/dma-coherent.h> |
16 | 16 | ||
17 | #ifdef CONFIG_ISA | ||
18 | # define ISA_DMA_BIT_MASK DMA_BIT_MASK(24) | ||
19 | #else | ||
20 | # define ISA_DMA_BIT_MASK DMA_BIT_MASK(32) | ||
21 | #endif | ||
22 | |||
17 | extern dma_addr_t bad_dma_address; | 23 | extern dma_addr_t bad_dma_address; |
18 | extern int iommu_merge; | 24 | extern int iommu_merge; |
19 | extern struct device x86_dma_fallback_dev; | 25 | extern struct device x86_dma_fallback_dev; |
@@ -124,10 +130,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
124 | if (dma_alloc_from_coherent(dev, size, dma_handle, &memory)) | 130 | if (dma_alloc_from_coherent(dev, size, dma_handle, &memory)) |
125 | return memory; | 131 | return memory; |
126 | 132 | ||
127 | if (!dev) { | 133 | if (!dev) |
128 | dev = &x86_dma_fallback_dev; | 134 | dev = &x86_dma_fallback_dev; |
129 | gfp |= GFP_DMA; | ||
130 | } | ||
131 | 135 | ||
132 | if (!is_device_dma_capable(dev)) | 136 | if (!is_device_dma_capable(dev)) |
133 | return NULL; | 137 | return NULL; |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index c3429e8b2424..c9786480f0fe 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -1000,7 +1000,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); | |||
1000 | #define thread_saved_pc(t) (*(unsigned long *)((t)->thread.sp - 8)) | 1000 | #define thread_saved_pc(t) (*(unsigned long *)((t)->thread.sp - 8)) |
1001 | 1001 | ||
1002 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) | 1002 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) |
1003 | #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */ | 1003 | extern unsigned long KSTK_ESP(struct task_struct *task); |
1004 | #endif /* CONFIG_X86_64 */ | 1004 | #endif /* CONFIG_X86_64 */ |
1005 | 1005 | ||
1006 | extern void start_thread(struct pt_regs *regs, unsigned long new_ip, | 1006 | extern void start_thread(struct pt_regs *regs, unsigned long new_ip, |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 25a92842dd99..40e37b10c6c0 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -143,6 +143,7 @@ extern unsigned long node_remap_size[]; | |||
143 | | 1*SD_BALANCE_FORK \ | 143 | | 1*SD_BALANCE_FORK \ |
144 | | 0*SD_BALANCE_WAKE \ | 144 | | 0*SD_BALANCE_WAKE \ |
145 | | 1*SD_WAKE_AFFINE \ | 145 | | 1*SD_WAKE_AFFINE \ |
146 | | 0*SD_PREFER_LOCAL \ | ||
146 | | 0*SD_SHARE_CPUPOWER \ | 147 | | 0*SD_SHARE_CPUPOWER \ |
147 | | 0*SD_POWERSAVINGS_BALANCE \ | 148 | | 0*SD_POWERSAVINGS_BALANCE \ |
148 | | 0*SD_SHARE_PKG_RESOURCES \ | 149 | | 0*SD_SHARE_PKG_RESOURCES \ |
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index 04eb6c958b9d..d1414af98559 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <asm/types.h> | 19 | #include <asm/types.h> |
20 | #include <asm/percpu.h> | 20 | #include <asm/percpu.h> |
21 | #include <asm/uv/uv_mmrs.h> | 21 | #include <asm/uv/uv_mmrs.h> |
22 | #include <asm/irq_vectors.h> | ||
23 | #include <asm/io_apic.h> | ||
22 | 24 | ||
23 | 25 | ||
24 | /* | 26 | /* |
@@ -114,7 +116,7 @@ | |||
114 | /* | 116 | /* |
115 | * The largest possible NASID of a C or M brick (+ 2) | 117 | * The largest possible NASID of a C or M brick (+ 2) |
116 | */ | 118 | */ |
117 | #define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_NODES * 2) | 119 | #define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_BLADES * 2) |
118 | 120 | ||
119 | struct uv_scir_s { | 121 | struct uv_scir_s { |
120 | struct timer_list timer; | 122 | struct timer_list timer; |
@@ -230,6 +232,20 @@ static inline unsigned long uv_gpa(void *v) | |||
230 | return uv_soc_phys_ram_to_gpa(__pa(v)); | 232 | return uv_soc_phys_ram_to_gpa(__pa(v)); |
231 | } | 233 | } |
232 | 234 | ||
235 | /* gnode -> pnode */ | ||
236 | static inline unsigned long uv_gpa_to_gnode(unsigned long gpa) | ||
237 | { | ||
238 | return gpa >> uv_hub_info->m_val; | ||
239 | } | ||
240 | |||
241 | /* gpa -> pnode */ | ||
242 | static inline int uv_gpa_to_pnode(unsigned long gpa) | ||
243 | { | ||
244 | unsigned long n_mask = (1UL << uv_hub_info->n_val) - 1; | ||
245 | |||
246 | return uv_gpa_to_gnode(gpa) & n_mask; | ||
247 | } | ||
248 | |||
233 | /* pnode, offset --> socket virtual */ | 249 | /* pnode, offset --> socket virtual */ |
234 | static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset) | 250 | static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset) |
235 | { | 251 | { |
@@ -421,9 +437,14 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) | |||
421 | static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) | 437 | static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) |
422 | { | 438 | { |
423 | unsigned long val; | 439 | unsigned long val; |
440 | unsigned long dmode = dest_Fixed; | ||
441 | |||
442 | if (vector == NMI_VECTOR) | ||
443 | dmode = dest_NMI; | ||
424 | 444 | ||
425 | val = (1UL << UVH_IPI_INT_SEND_SHFT) | | 445 | val = (1UL << UVH_IPI_INT_SEND_SHFT) | |
426 | ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) | | 446 | ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) | |
447 | (dmode << UVH_IPI_INT_DELIVERY_MODE_SHFT) | | ||
427 | (vector << UVH_IPI_INT_VECTOR_SHFT); | 448 | (vector << UVH_IPI_INT_VECTOR_SHFT); |
428 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); | 449 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); |
429 | } | 450 | } |