diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 14:04:15 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 14:06:24 -0500 |
commit | a7790532f5b7358c33a6b1834dc2b318de209f31 (patch) | |
tree | 0ceb9e24b3f54cb5c8453fb5a218e2a94a0f1cce /arch/ia64 | |
parent | 2764fb4244cc1bc08df3667924ca4a972e90ac70 (diff) | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
The SmartMedia FTL code depends on new kfifo bits from 2.6.33
Diffstat (limited to 'arch/ia64')
26 files changed, 117 insertions, 154 deletions
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index e7cbaa02cd0b..475e2725fbde 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -103,4 +103,4 @@ archprepare: make_nr_irqs_h FORCE | |||
103 | PHONY += make_nr_irqs_h FORCE | 103 | PHONY += make_nr_irqs_h FORCE |
104 | 104 | ||
105 | make_nr_irqs_h: FORCE | 105 | make_nr_irqs_h: FORCE |
106 | $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h | 106 | $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index f332e3fe4237..e14c492a8a93 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -677,12 +677,19 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size) | |||
677 | spin_unlock_irqrestore(&ioc->saved_lock, flags); | 677 | spin_unlock_irqrestore(&ioc->saved_lock, flags); |
678 | 678 | ||
679 | pide = sba_search_bitmap(ioc, dev, pages_needed, 0); | 679 | pide = sba_search_bitmap(ioc, dev, pages_needed, 0); |
680 | if (unlikely(pide >= (ioc->res_size << 3))) | 680 | if (unlikely(pide >= (ioc->res_size << 3))) { |
681 | panic(__FILE__ ": I/O MMU @ %p is out of mapping resources\n", | 681 | printk(KERN_WARNING "%s: I/O MMU @ %p is" |
682 | ioc->ioc_hpa); | 682 | "out of mapping resources, %u %u %lx\n", |
683 | __func__, ioc->ioc_hpa, ioc->res_size, | ||
684 | pages_needed, dma_get_seg_boundary(dev)); | ||
685 | return -1; | ||
686 | } | ||
683 | #else | 687 | #else |
684 | panic(__FILE__ ": I/O MMU @ %p is out of mapping resources\n", | 688 | printk(KERN_WARNING "%s: I/O MMU @ %p is" |
685 | ioc->ioc_hpa); | 689 | "out of mapping resources, %u %u %lx\n", |
690 | __func__, ioc->ioc_hpa, ioc->res_size, | ||
691 | pages_needed, dma_get_seg_boundary(dev)); | ||
692 | return -1; | ||
686 | #endif | 693 | #endif |
687 | } | 694 | } |
688 | } | 695 | } |
@@ -965,6 +972,8 @@ static dma_addr_t sba_map_page(struct device *dev, struct page *page, | |||
965 | #endif | 972 | #endif |
966 | 973 | ||
967 | pide = sba_alloc_range(ioc, dev, size); | 974 | pide = sba_alloc_range(ioc, dev, size); |
975 | if (pide < 0) | ||
976 | return 0; | ||
968 | 977 | ||
969 | iovp = (dma_addr_t) pide << iovp_shift; | 978 | iovp = (dma_addr_t) pide << iovp_shift; |
970 | 979 | ||
@@ -1320,6 +1329,7 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, | |||
1320 | unsigned long dma_offset, dma_len; /* start/len of DMA stream */ | 1329 | unsigned long dma_offset, dma_len; /* start/len of DMA stream */ |
1321 | int n_mappings = 0; | 1330 | int n_mappings = 0; |
1322 | unsigned int max_seg_size = dma_get_max_seg_size(dev); | 1331 | unsigned int max_seg_size = dma_get_max_seg_size(dev); |
1332 | int idx; | ||
1323 | 1333 | ||
1324 | while (nents > 0) { | 1334 | while (nents > 0) { |
1325 | unsigned long vaddr = (unsigned long) sba_sg_address(startsg); | 1335 | unsigned long vaddr = (unsigned long) sba_sg_address(startsg); |
@@ -1418,16 +1428,22 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, | |||
1418 | vcontig_sg->dma_length = vcontig_len; | 1428 | vcontig_sg->dma_length = vcontig_len; |
1419 | dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask; | 1429 | dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask; |
1420 | ASSERT(dma_len <= DMA_CHUNK_SIZE); | 1430 | ASSERT(dma_len <= DMA_CHUNK_SIZE); |
1421 | dma_sg->dma_address = (dma_addr_t) (PIDE_FLAG | 1431 | idx = sba_alloc_range(ioc, dev, dma_len); |
1422 | | (sba_alloc_range(ioc, dev, dma_len) << iovp_shift) | 1432 | if (idx < 0) { |
1423 | | dma_offset); | 1433 | dma_sg->dma_length = 0; |
1434 | return -1; | ||
1435 | } | ||
1436 | dma_sg->dma_address = (dma_addr_t)(PIDE_FLAG | (idx << iovp_shift) | ||
1437 | | dma_offset); | ||
1424 | n_mappings++; | 1438 | n_mappings++; |
1425 | } | 1439 | } |
1426 | 1440 | ||
1427 | return n_mappings; | 1441 | return n_mappings; |
1428 | } | 1442 | } |
1429 | 1443 | ||
1430 | 1444 | static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, | |
1445 | int nents, enum dma_data_direction dir, | ||
1446 | struct dma_attrs *attrs); | ||
1431 | /** | 1447 | /** |
1432 | * sba_map_sg - map Scatter/Gather list | 1448 | * sba_map_sg - map Scatter/Gather list |
1433 | * @dev: instance of PCI owned by the driver that's asking. | 1449 | * @dev: instance of PCI owned by the driver that's asking. |
@@ -1493,6 +1509,10 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, | |||
1493 | ** Access to the virtual address is what forces a two pass algorithm. | 1509 | ** Access to the virtual address is what forces a two pass algorithm. |
1494 | */ | 1510 | */ |
1495 | coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); | 1511 | coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); |
1512 | if (coalesced < 0) { | ||
1513 | sba_unmap_sg_attrs(dev, sglist, nents, dir, attrs); | ||
1514 | return 0; | ||
1515 | } | ||
1496 | 1516 | ||
1497 | /* | 1517 | /* |
1498 | ** Program the I/O Pdir | 1518 | ** Program the I/O Pdir |
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index 91df9686a0da..e97b255d97bc 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h | |||
@@ -94,6 +94,7 @@ ia64_acpi_release_global_lock (unsigned int *lock) | |||
94 | #define acpi_noirq 0 /* ACPI always enabled on IA64 */ | 94 | #define acpi_noirq 0 /* ACPI always enabled on IA64 */ |
95 | #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ | 95 | #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ |
96 | #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ | 96 | #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ |
97 | #define acpi_ht 0 /* no HT-only mode on IA64 */ | ||
97 | #endif | 98 | #endif |
98 | #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ | 99 | #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ |
99 | static inline void disable_acpi(void) { } | 100 | static inline void disable_acpi(void) { } |
@@ -132,6 +133,12 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; | |||
132 | extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; | 133 | extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; |
133 | #endif | 134 | #endif |
134 | 135 | ||
136 | static inline bool arch_has_acpi_pdc(void) { return true; } | ||
137 | static inline void arch_acpi_set_pdc_bits(u32 *buf) | ||
138 | { | ||
139 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; | ||
140 | } | ||
141 | |||
135 | #define acpi_unlazy_tlb(x) | 142 | #define acpi_unlazy_tlb(x) |
136 | 143 | ||
137 | #ifdef CONFIG_ACPI_NUMA | 144 | #ifdef CONFIG_ACPI_NUMA |
diff --git a/arch/ia64/include/asm/asm-offsets.h b/arch/ia64/include/asm/asm-offsets.h new file mode 100644 index 000000000000..d370ee36a182 --- /dev/null +++ b/arch/ia64/include/asm/asm-offsets.h | |||
@@ -0,0 +1 @@ | |||
#include <generated/asm-offsets.h> | |||
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index e14108b19c09..4c41656ede87 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
@@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
201 | relevant until we have real hardware to play with... */ | 201 | relevant until we have real hardware to play with... */ |
202 | #define ELF_PLATFORM NULL | 202 | #define ELF_PLATFORM NULL |
203 | 203 | ||
204 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | 204 | #define SET_PERSONALITY(ex) \ |
205 | set_personality((current->personality & ~PER_MASK) | PER_LINUX) | ||
206 | |||
205 | #define elf_read_implies_exec(ex, executable_stack) \ | 207 | #define elf_read_implies_exec(ex, executable_stack) \ |
206 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) | 208 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |
207 | 209 | ||
diff --git a/arch/ia64/include/asm/ftrace.h b/arch/ia64/include/asm/ftrace.h index d20db3c2a656..fbd1a2470cae 100644 --- a/arch/ia64/include/asm/ftrace.h +++ b/arch/ia64/include/asm/ftrace.h | |||
@@ -8,7 +8,6 @@ | |||
8 | extern void _mcount(unsigned long pfs, unsigned long r1, unsigned long b0, unsigned long r0); | 8 | extern void _mcount(unsigned long pfs, unsigned long r1, unsigned long b0, unsigned long r0); |
9 | #define mcount _mcount | 9 | #define mcount _mcount |
10 | 10 | ||
11 | #include <asm/kprobes.h> | ||
12 | /* In IA64, MCOUNT_ADDR is set in link time, so it's not a constant at compile time */ | 11 | /* In IA64, MCOUNT_ADDR is set in link time, so it's not a constant at compile time */ |
13 | #define MCOUNT_ADDR (((struct fnptr *)mcount)->ip) | 12 | #define MCOUNT_ADDR (((struct fnptr *)mcount)->ip) |
14 | #define FTRACE_ADDR (((struct fnptr *)ftrace_caller)->ip) | 13 | #define FTRACE_ADDR (((struct fnptr *)ftrace_caller)->ip) |
diff --git a/arch/ia64/include/asm/hw_irq.h b/arch/ia64/include/asm/hw_irq.h index 91619b31dbf5..bf2e37493e04 100644 --- a/arch/ia64/include/asm/hw_irq.h +++ b/arch/ia64/include/asm/hw_irq.h | |||
@@ -59,7 +59,13 @@ typedef u16 ia64_vector; | |||
59 | extern int ia64_first_device_vector; | 59 | extern int ia64_first_device_vector; |
60 | extern int ia64_last_device_vector; | 60 | extern int ia64_last_device_vector; |
61 | 61 | ||
62 | #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_DIG)) | ||
63 | /* Reserve the lower priority vector than device vectors for "move IRQ" IPI */ | ||
64 | #define IA64_IRQ_MOVE_VECTOR 0x30 /* "move IRQ" IPI */ | ||
65 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x31 | ||
66 | #else | ||
62 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 | 67 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 |
68 | #endif | ||
63 | #define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 | 69 | #define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 |
64 | #define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector | 70 | #define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector |
65 | #define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector | 71 | #define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector |
diff --git a/arch/ia64/include/asm/irq.h b/arch/ia64/include/asm/irq.h index 5282546cdf82..91b920fd7d53 100644 --- a/arch/ia64/include/asm/irq.h +++ b/arch/ia64/include/asm/irq.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/cpumask.h> | 15 | #include <linux/cpumask.h> |
16 | #include <asm-ia64/nr-irqs.h> | 16 | #include <generated/nr-irqs.h> |
17 | 17 | ||
18 | static __inline__ int | 18 | static __inline__ int |
19 | irq_canonicalize (int irq) | 19 | irq_canonicalize (int irq) |
diff --git a/arch/ia64/include/asm/kprobes.h b/arch/ia64/include/asm/kprobes.h index dbf83fb28db3..d5505d6f2382 100644 --- a/arch/ia64/include/asm/kprobes.h +++ b/arch/ia64/include/asm/kprobes.h | |||
@@ -103,11 +103,6 @@ typedef struct kprobe_opcode { | |||
103 | bundle_t bundle; | 103 | bundle_t bundle; |
104 | } kprobe_opcode_t; | 104 | } kprobe_opcode_t; |
105 | 105 | ||
106 | struct fnptr { | ||
107 | unsigned long ip; | ||
108 | unsigned long gp; | ||
109 | }; | ||
110 | |||
111 | /* Architecture specific copy of original instruction*/ | 106 | /* Architecture specific copy of original instruction*/ |
112 | struct arch_specific_insn { | 107 | struct arch_specific_insn { |
113 | /* copy of the instruction to be emulated */ | 108 | /* copy of the instruction to be emulated */ |
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h index c171cdf0a789..43f96ab18fa0 100644 --- a/arch/ia64/include/asm/mca.h +++ b/arch/ia64/include/asm/mca.h | |||
@@ -106,6 +106,11 @@ struct ia64_sal_os_state { | |||
106 | unsigned long os_status; /* OS status to SAL, enum below */ | 106 | unsigned long os_status; /* OS status to SAL, enum below */ |
107 | unsigned long context; /* 0 if return to same context | 107 | unsigned long context; /* 0 if return to same context |
108 | 1 if return to new context */ | 108 | 1 if return to new context */ |
109 | |||
110 | /* I-resources */ | ||
111 | unsigned long iip; | ||
112 | unsigned long ipsr; | ||
113 | unsigned long ifs; | ||
109 | }; | 114 | }; |
110 | 115 | ||
111 | enum { | 116 | enum { |
diff --git a/arch/ia64/include/asm/rwsem.h b/arch/ia64/include/asm/rwsem.h index fbee74b15782..e8762688e8e3 100644 --- a/arch/ia64/include/asm/rwsem.h +++ b/arch/ia64/include/asm/rwsem.h | |||
@@ -47,7 +47,7 @@ struct rw_semaphore { | |||
47 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 47 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
48 | 48 | ||
49 | #define __RWSEM_INITIALIZER(name) \ | 49 | #define __RWSEM_INITIALIZER(name) \ |
50 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ | 50 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |
51 | LIST_HEAD_INIT((name).wait_list) } | 51 | LIST_HEAD_INIT((name).wait_list) } |
52 | 52 | ||
53 | #define DECLARE_RWSEM(name) \ | 53 | #define DECLARE_RWSEM(name) \ |
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h index 85d965cb19a0..23cce999eb1c 100644 --- a/arch/ia64/include/asm/tlb.h +++ b/arch/ia64/include/asm/tlb.h | |||
@@ -74,7 +74,7 @@ struct ia64_tr_entry { | |||
74 | extern int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size); | 74 | extern int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size); |
75 | extern void ia64_ptr_entry(u64 target_mask, int slot); | 75 | extern void ia64_ptr_entry(u64 target_mask, int slot); |
76 | 76 | ||
77 | extern struct ia64_tr_entry __per_cpu_idtrs[NR_CPUS][2][IA64_TR_ALLOC_MAX]; | 77 | extern struct ia64_tr_entry *ia64_idtrs[NR_CPUS]; |
78 | 78 | ||
79 | /* | 79 | /* |
80 | region register macros | 80 | region register macros |
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 3ddb4e709dba..d323071d0f91 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h | |||
@@ -33,7 +33,9 @@ | |||
33 | /* | 33 | /* |
34 | * Returns a bitmask of CPUs on Node 'node'. | 34 | * Returns a bitmask of CPUs on Node 'node'. |
35 | */ | 35 | */ |
36 | #define cpumask_of_node(node) (&node_to_cpu_mask[node]) | 36 | #define cpumask_of_node(node) ((node) == -1 ? \ |
37 | cpu_all_mask : \ | ||
38 | &node_to_cpu_mask[node]) | ||
37 | 39 | ||
38 | /* | 40 | /* |
39 | * Returns the number of the node containing Node 'nid'. | 41 | * Returns the number of the node containing Node 'nid'. |
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index bcd260e597de..93773fd37be0 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h | |||
@@ -35,6 +35,11 @@ typedef unsigned int umode_t; | |||
35 | */ | 35 | */ |
36 | # ifdef __KERNEL__ | 36 | # ifdef __KERNEL__ |
37 | 37 | ||
38 | struct fnptr { | ||
39 | unsigned long ip; | ||
40 | unsigned long gp; | ||
41 | }; | ||
42 | |||
38 | /* DMA addresses are 64-bits wide, in general. */ | 43 | /* DMA addresses are 64-bits wide, in general. */ |
39 | typedef u64 dma_addr_t; | 44 | typedef u64 dma_addr_t; |
40 | 45 | ||
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 6b7edcab0cb5..e1236349c99f 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -18,10 +18,6 @@ obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o | |||
18 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o | 18 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o |
19 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o | 19 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o |
20 | 20 | ||
21 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
22 | obj-y += acpi-processor.o | ||
23 | endif | ||
24 | |||
25 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o | 21 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o |
26 | obj-$(CONFIG_IOSAPIC) += iosapic.o | 22 | obj-$(CONFIG_IOSAPIC) += iosapic.o |
27 | obj-$(CONFIG_MODULES) += module.o | 23 | obj-$(CONFIG_MODULES) += module.o |
@@ -81,17 +77,14 @@ define cmd_nr_irqs | |||
81 | endef | 77 | endef |
82 | 78 | ||
83 | # We use internal kbuild rules to avoid the "is up to date" message from make | 79 | # We use internal kbuild rules to avoid the "is up to date" message from make |
84 | arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \ | 80 | arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c |
85 | $(wildcard $(srctree)/include/asm-ia64/*/irq.h) | ||
86 | $(Q)mkdir -p $(dir $@) | 81 | $(Q)mkdir -p $(dir $@) |
87 | $(call if_changed_dep,cc_s_c) | 82 | $(call if_changed_dep,cc_s_c) |
88 | 83 | ||
89 | include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s | 84 | include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s |
90 | $(Q)mkdir -p $(dir $@) | 85 | $(Q)mkdir -p $(dir $@) |
91 | $(call cmd,nr_irqs) | 86 | $(call cmd,nr_irqs) |
92 | 87 | ||
93 | clean-files += $(objtree)/include/asm-ia64/nr-irqs.h | ||
94 | |||
95 | # | 88 | # |
96 | # native ivt.S, entry.S and fsys.S | 89 | # native ivt.S, entry.S and fsys.S |
97 | # | 90 | # |
diff --git a/arch/ia64/kernel/acpi-processor.c b/arch/ia64/kernel/acpi-processor.c deleted file mode 100644 index dbda7bde6112..000000000000 --- a/arch/ia64/kernel/acpi-processor.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ia64/kernel/acpi-processor.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for platforms with Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
48 | /* | ||
49 | * The default of PDC_SMP_T_SWCOORD bit is set for IA64 cpu so | ||
50 | * that OSPM is capable of native ACPI throttling software | ||
51 | * coordination using BIOS supplied _TSD info. | ||
52 | */ | ||
53 | buf[2] |= ACPI_PDC_SMP_T_SWCOORD; | ||
54 | |||
55 | obj->type = ACPI_TYPE_BUFFER; | ||
56 | obj->buffer.length = 12; | ||
57 | obj->buffer.pointer = (u8 *) buf; | ||
58 | obj_list->count = 1; | ||
59 | obj_list->pointer = obj; | ||
60 | pr->pdc = obj_list; | ||
61 | |||
62 | return; | ||
63 | } | ||
64 | |||
65 | /* Initialize _PDC data based on the CPU vendor */ | ||
66 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
67 | { | ||
68 | pr->pdc = NULL; | ||
69 | init_intel_pdc(pr); | ||
70 | return; | ||
71 | } | ||
72 | |||
73 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
74 | |||
75 | void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr) | ||
76 | { | ||
77 | if (pr->pdc) { | ||
78 | kfree(pr->pdc->pointer->buffer.pointer); | ||
79 | kfree(pr->pdc->pointer); | ||
80 | kfree(pr->pdc); | ||
81 | pr->pdc = NULL; | ||
82 | } | ||
83 | } | ||
84 | |||
85 | EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc); | ||
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 70e4bad23432..d4093a173a3e 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -260,7 +260,6 @@ void __setup_vector_irq(int cpu) | |||
260 | } | 260 | } |
261 | 261 | ||
262 | #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) | 262 | #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) |
263 | #define IA64_IRQ_MOVE_VECTOR IA64_DEF_FIRST_DEVICE_VECTOR | ||
264 | 263 | ||
265 | static enum vector_domain_type { | 264 | static enum vector_domain_type { |
266 | VECTOR_DOMAIN_NONE, | 265 | VECTOR_DOMAIN_NONE, |
@@ -659,11 +658,8 @@ init_IRQ (void) | |||
659 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); | 658 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); |
660 | #ifdef CONFIG_SMP | 659 | #ifdef CONFIG_SMP |
661 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) | 660 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) |
662 | if (vector_domain_type != VECTOR_DOMAIN_NONE) { | 661 | if (vector_domain_type != VECTOR_DOMAIN_NONE) |
663 | BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR); | ||
664 | IA64_FIRST_DEVICE_VECTOR++; | ||
665 | register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); | 662 | register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); |
666 | } | ||
667 | #endif | 663 | #endif |
668 | #endif | 664 | #endif |
669 | #ifdef CONFIG_PERFMON | 665 | #ifdef CONFIG_PERFMON |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 496ac7a99488..378b4833024f 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -888,9 +888,10 @@ ia64_mca_modify_comm(const struct task_struct *previous_current) | |||
888 | } | 888 | } |
889 | 889 | ||
890 | static void | 890 | static void |
891 | finish_pt_regs(struct pt_regs *regs, const pal_min_state_area_t *ms, | 891 | finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos, |
892 | unsigned long *nat) | 892 | unsigned long *nat) |
893 | { | 893 | { |
894 | const pal_min_state_area_t *ms = sos->pal_min_state; | ||
894 | const u64 *bank; | 895 | const u64 *bank; |
895 | 896 | ||
896 | /* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use | 897 | /* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use |
@@ -904,6 +905,10 @@ finish_pt_regs(struct pt_regs *regs, const pal_min_state_area_t *ms, | |||
904 | regs->cr_iip = ms->pmsa_xip; | 905 | regs->cr_iip = ms->pmsa_xip; |
905 | regs->cr_ipsr = ms->pmsa_xpsr; | 906 | regs->cr_ipsr = ms->pmsa_xpsr; |
906 | regs->cr_ifs = ms->pmsa_xfs; | 907 | regs->cr_ifs = ms->pmsa_xfs; |
908 | |||
909 | sos->iip = ms->pmsa_iip; | ||
910 | sos->ipsr = ms->pmsa_ipsr; | ||
911 | sos->ifs = ms->pmsa_ifs; | ||
907 | } | 912 | } |
908 | regs->pr = ms->pmsa_pr; | 913 | regs->pr = ms->pmsa_pr; |
909 | regs->b0 = ms->pmsa_br0; | 914 | regs->b0 = ms->pmsa_br0; |
@@ -1079,7 +1084,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs, | |||
1079 | memcpy(old_regs, regs, sizeof(*regs)); | 1084 | memcpy(old_regs, regs, sizeof(*regs)); |
1080 | old_regs->loadrs = loadrs; | 1085 | old_regs->loadrs = loadrs; |
1081 | old_unat = old_regs->ar_unat; | 1086 | old_unat = old_regs->ar_unat; |
1082 | finish_pt_regs(old_regs, ms, &old_unat); | 1087 | finish_pt_regs(old_regs, sos, &old_unat); |
1083 | 1088 | ||
1084 | /* Next stack a struct switch_stack. mca_asm.S built a partial | 1089 | /* Next stack a struct switch_stack. mca_asm.S built a partial |
1085 | * switch_stack, copy it and fill in the blanks using pt_regs and | 1090 | * switch_stack, copy it and fill in the blanks using pt_regs and |
@@ -1150,7 +1155,7 @@ no_mod: | |||
1150 | mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n", | 1155 | mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n", |
1151 | smp_processor_id(), type, msg); | 1156 | smp_processor_id(), type, msg); |
1152 | old_unat = regs->ar_unat; | 1157 | old_unat = regs->ar_unat; |
1153 | finish_pt_regs(regs, ms, &old_unat); | 1158 | finish_pt_regs(regs, sos, &old_unat); |
1154 | return previous_current; | 1159 | return previous_current; |
1155 | } | 1160 | } |
1156 | 1161 | ||
@@ -1220,9 +1225,12 @@ static void mca_insert_tr(u64 iord) | |||
1220 | unsigned long psr; | 1225 | unsigned long psr; |
1221 | int cpu = smp_processor_id(); | 1226 | int cpu = smp_processor_id(); |
1222 | 1227 | ||
1228 | if (!ia64_idtrs[cpu]) | ||
1229 | return; | ||
1230 | |||
1223 | psr = ia64_clear_ic(); | 1231 | psr = ia64_clear_ic(); |
1224 | for (i = IA64_TR_ALLOC_BASE; i < IA64_TR_ALLOC_MAX; i++) { | 1232 | for (i = IA64_TR_ALLOC_BASE; i < IA64_TR_ALLOC_MAX; i++) { |
1225 | p = &__per_cpu_idtrs[cpu][iord-1][i]; | 1233 | p = ia64_idtrs[cpu] + (iord - 1) * IA64_TR_ALLOC_MAX; |
1226 | if (p->pte & 0x1) { | 1234 | if (p->pte & 0x1) { |
1227 | old_rr = ia64_get_rr(p->ifa); | 1235 | old_rr = ia64_get_rr(p->ifa); |
1228 | if (old_rr != p->rr) { | 1236 | if (old_rr != p->rr) { |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 599b233bef75..6bcbe215b9a4 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2200,7 +2200,7 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2200 | { | 2200 | { |
2201 | struct file *file; | 2201 | struct file *file; |
2202 | struct inode *inode; | 2202 | struct inode *inode; |
2203 | struct dentry *dentry; | 2203 | struct path path; |
2204 | char name[32]; | 2204 | char name[32]; |
2205 | struct qstr this; | 2205 | struct qstr this; |
2206 | 2206 | ||
@@ -2225,18 +2225,19 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2225 | /* | 2225 | /* |
2226 | * allocate a new dcache entry | 2226 | * allocate a new dcache entry |
2227 | */ | 2227 | */ |
2228 | dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2228 | path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2229 | if (!dentry) { | 2229 | if (!path.dentry) { |
2230 | iput(inode); | 2230 | iput(inode); |
2231 | return ERR_PTR(-ENOMEM); | 2231 | return ERR_PTR(-ENOMEM); |
2232 | } | 2232 | } |
2233 | path.mnt = mntget(pfmfs_mnt); | ||
2233 | 2234 | ||
2234 | dentry->d_op = &pfmfs_dentry_operations; | 2235 | path.dentry->d_op = &pfmfs_dentry_operations; |
2235 | d_add(dentry, inode); | 2236 | d_add(path.dentry, inode); |
2236 | 2237 | ||
2237 | file = alloc_file(pfmfs_mnt, dentry, FMODE_READ, &pfm_file_ops); | 2238 | file = alloc_file(&path, FMODE_READ, &pfm_file_ops); |
2238 | if (!file) { | 2239 | if (!file) { |
2239 | dput(dentry); | 2240 | path_put(&path); |
2240 | return ERR_PTR(-ENFILE); | 2241 | return ERR_PTR(-ENFILE); |
2241 | } | 2242 | } |
2242 | 2243 | ||
@@ -2292,7 +2293,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t | |||
2292 | * if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur) | 2293 | * if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur) |
2293 | * return -ENOMEM; | 2294 | * return -ENOMEM; |
2294 | */ | 2295 | */ |
2295 | if (size > task->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) | 2296 | if (size > task_rlimit(task, RLIMIT_MEMLOCK)) |
2296 | return -ENOMEM; | 2297 | return -ENOMEM; |
2297 | 2298 | ||
2298 | /* | 2299 | /* |
diff --git a/arch/ia64/kvm/asm-offsets.c b/arch/ia64/kvm/asm-offsets.c index 0c3564a7a033..9324c875caf5 100644 --- a/arch/ia64/kvm/asm-offsets.c +++ b/arch/ia64/kvm/asm-offsets.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/autoconf.h> | ||
26 | #include <linux/kvm_host.h> | 25 | #include <linux/kvm_host.h> |
27 | #include <linux/kbuild.h> | 26 | #include <linux/kbuild.h> |
28 | 27 | ||
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h index 360724d3ae69..988911b4cc7a 100644 --- a/arch/ia64/kvm/vcpu.h +++ b/arch/ia64/kvm/vcpu.h | |||
@@ -388,6 +388,9 @@ static inline u64 __gpfn_is_io(u64 gpfn) | |||
388 | #define _vmm_raw_spin_lock(x) do {}while(0) | 388 | #define _vmm_raw_spin_lock(x) do {}while(0) |
389 | #define _vmm_raw_spin_unlock(x) do {}while(0) | 389 | #define _vmm_raw_spin_unlock(x) do {}while(0) |
390 | #else | 390 | #else |
391 | typedef struct { | ||
392 | volatile unsigned int lock; | ||
393 | } vmm_spinlock_t; | ||
391 | #define _vmm_raw_spin_lock(x) \ | 394 | #define _vmm_raw_spin_lock(x) \ |
392 | do { \ | 395 | do { \ |
393 | __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ | 396 | __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ |
@@ -405,12 +408,12 @@ static inline u64 __gpfn_is_io(u64 gpfn) | |||
405 | 408 | ||
406 | #define _vmm_raw_spin_unlock(x) \ | 409 | #define _vmm_raw_spin_unlock(x) \ |
407 | do { barrier(); \ | 410 | do { barrier(); \ |
408 | ((spinlock_t *)x)->raw_lock.lock = 0; } \ | 411 | ((vmm_spinlock_t *)x)->lock = 0; } \ |
409 | while (0) | 412 | while (0) |
410 | #endif | 413 | #endif |
411 | 414 | ||
412 | void vmm_spin_lock(spinlock_t *lock); | 415 | void vmm_spin_lock(vmm_spinlock_t *lock); |
413 | void vmm_spin_unlock(spinlock_t *lock); | 416 | void vmm_spin_unlock(vmm_spinlock_t *lock); |
414 | enum { | 417 | enum { |
415 | I_TLB = 1, | 418 | I_TLB = 1, |
416 | D_TLB = 2 | 419 | D_TLB = 2 |
diff --git a/arch/ia64/kvm/vmm.c b/arch/ia64/kvm/vmm.c index f4b4c899bb6c..7a62f75778c5 100644 --- a/arch/ia64/kvm/vmm.c +++ b/arch/ia64/kvm/vmm.c | |||
@@ -60,12 +60,12 @@ static void __exit kvm_vmm_exit(void) | |||
60 | return ; | 60 | return ; |
61 | } | 61 | } |
62 | 62 | ||
63 | void vmm_spin_lock(spinlock_t *lock) | 63 | void vmm_spin_lock(vmm_spinlock_t *lock) |
64 | { | 64 | { |
65 | _vmm_raw_spin_lock(lock); | 65 | _vmm_raw_spin_lock(lock); |
66 | } | 66 | } |
67 | 67 | ||
68 | void vmm_spin_unlock(spinlock_t *lock) | 68 | void vmm_spin_unlock(vmm_spinlock_t *lock) |
69 | { | 69 | { |
70 | _vmm_raw_spin_unlock(lock); | 70 | _vmm_raw_spin_unlock(lock); |
71 | } | 71 | } |
diff --git a/arch/ia64/kvm/vtlb.c b/arch/ia64/kvm/vtlb.c index 20b3852f7a6e..4332f7ee5203 100644 --- a/arch/ia64/kvm/vtlb.c +++ b/arch/ia64/kvm/vtlb.c | |||
@@ -182,7 +182,7 @@ void mark_pages_dirty(struct kvm_vcpu *v, u64 pte, u64 ps) | |||
182 | { | 182 | { |
183 | u64 i, dirty_pages = 1; | 183 | u64 i, dirty_pages = 1; |
184 | u64 base_gfn = (pte&_PAGE_PPN_MASK) >> PAGE_SHIFT; | 184 | u64 base_gfn = (pte&_PAGE_PPN_MASK) >> PAGE_SHIFT; |
185 | spinlock_t *lock = __kvm_va(v->arch.dirty_log_lock_pa); | 185 | vmm_spinlock_t *lock = __kvm_va(v->arch.dirty_log_lock_pa); |
186 | void *dirty_bitmap = (void *)KVM_MEM_DIRTY_LOG_BASE; | 186 | void *dirty_bitmap = (void *)KVM_MEM_DIRTY_LOG_BASE; |
187 | 187 | ||
188 | dirty_pages <<= ps <= PAGE_SHIFT ? 0 : ps - PAGE_SHIFT; | 188 | dirty_pages <<= ps <= PAGE_SHIFT ? 0 : ps - PAGE_SHIFT; |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index b9609c69343a..7c0d4814a68d 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -91,7 +91,7 @@ dma_mark_clean(void *addr, size_t size) | |||
91 | inline void | 91 | inline void |
92 | ia64_set_rbs_bot (void) | 92 | ia64_set_rbs_bot (void) |
93 | { | 93 | { |
94 | unsigned long stack_size = current->signal->rlim[RLIMIT_STACK].rlim_max & -16; | 94 | unsigned long stack_size = rlimit_max(RLIMIT_STACK) & -16; |
95 | 95 | ||
96 | if (stack_size > MAX_USER_STACK_SIZE) | 96 | if (stack_size > MAX_USER_STACK_SIZE) |
97 | stack_size = MAX_USER_STACK_SIZE; | 97 | stack_size = MAX_USER_STACK_SIZE; |
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index ee09d261f2e6..f3de9d7a98b4 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -48,7 +48,7 @@ DEFINE_PER_CPU(u8, ia64_need_tlb_flush); | |||
48 | DEFINE_PER_CPU(u8, ia64_tr_num); /*Number of TR slots in current processor*/ | 48 | DEFINE_PER_CPU(u8, ia64_tr_num); /*Number of TR slots in current processor*/ |
49 | DEFINE_PER_CPU(u8, ia64_tr_used); /*Max Slot number used by kernel*/ | 49 | DEFINE_PER_CPU(u8, ia64_tr_used); /*Max Slot number used by kernel*/ |
50 | 50 | ||
51 | struct ia64_tr_entry __per_cpu_idtrs[NR_CPUS][2][IA64_TR_ALLOC_MAX]; | 51 | struct ia64_tr_entry *ia64_idtrs[NR_CPUS]; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Initializes the ia64_ctx.bitmap array based on max_ctx+1. | 54 | * Initializes the ia64_ctx.bitmap array based on max_ctx+1. |
@@ -429,10 +429,16 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size) | |||
429 | struct ia64_tr_entry *p; | 429 | struct ia64_tr_entry *p; |
430 | int cpu = smp_processor_id(); | 430 | int cpu = smp_processor_id(); |
431 | 431 | ||
432 | if (!ia64_idtrs[cpu]) { | ||
433 | ia64_idtrs[cpu] = kmalloc(2 * IA64_TR_ALLOC_MAX * | ||
434 | sizeof (struct ia64_tr_entry), GFP_KERNEL); | ||
435 | if (!ia64_idtrs[cpu]) | ||
436 | return -ENOMEM; | ||
437 | } | ||
432 | r = -EINVAL; | 438 | r = -EINVAL; |
433 | /*Check overlap with existing TR entries*/ | 439 | /*Check overlap with existing TR entries*/ |
434 | if (target_mask & 0x1) { | 440 | if (target_mask & 0x1) { |
435 | p = &__per_cpu_idtrs[cpu][0][0]; | 441 | p = ia64_idtrs[cpu]; |
436 | for (i = IA64_TR_ALLOC_BASE; i <= per_cpu(ia64_tr_used, cpu); | 442 | for (i = IA64_TR_ALLOC_BASE; i <= per_cpu(ia64_tr_used, cpu); |
437 | i++, p++) { | 443 | i++, p++) { |
438 | if (p->pte & 0x1) | 444 | if (p->pte & 0x1) |
@@ -444,7 +450,7 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size) | |||
444 | } | 450 | } |
445 | } | 451 | } |
446 | if (target_mask & 0x2) { | 452 | if (target_mask & 0x2) { |
447 | p = &__per_cpu_idtrs[cpu][1][0]; | 453 | p = ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX; |
448 | for (i = IA64_TR_ALLOC_BASE; i <= per_cpu(ia64_tr_used, cpu); | 454 | for (i = IA64_TR_ALLOC_BASE; i <= per_cpu(ia64_tr_used, cpu); |
449 | i++, p++) { | 455 | i++, p++) { |
450 | if (p->pte & 0x1) | 456 | if (p->pte & 0x1) |
@@ -459,16 +465,16 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size) | |||
459 | for (i = IA64_TR_ALLOC_BASE; i < per_cpu(ia64_tr_num, cpu); i++) { | 465 | for (i = IA64_TR_ALLOC_BASE; i < per_cpu(ia64_tr_num, cpu); i++) { |
460 | switch (target_mask & 0x3) { | 466 | switch (target_mask & 0x3) { |
461 | case 1: | 467 | case 1: |
462 | if (!(__per_cpu_idtrs[cpu][0][i].pte & 0x1)) | 468 | if (!((ia64_idtrs[cpu] + i)->pte & 0x1)) |
463 | goto found; | 469 | goto found; |
464 | continue; | 470 | continue; |
465 | case 2: | 471 | case 2: |
466 | if (!(__per_cpu_idtrs[cpu][1][i].pte & 0x1)) | 472 | if (!((ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i)->pte & 0x1)) |
467 | goto found; | 473 | goto found; |
468 | continue; | 474 | continue; |
469 | case 3: | 475 | case 3: |
470 | if (!(__per_cpu_idtrs[cpu][0][i].pte & 0x1) && | 476 | if (!((ia64_idtrs[cpu] + i)->pte & 0x1) && |
471 | !(__per_cpu_idtrs[cpu][1][i].pte & 0x1)) | 477 | !((ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i)->pte & 0x1)) |
472 | goto found; | 478 | goto found; |
473 | continue; | 479 | continue; |
474 | default: | 480 | default: |
@@ -488,7 +494,7 @@ found: | |||
488 | if (target_mask & 0x1) { | 494 | if (target_mask & 0x1) { |
489 | ia64_itr(0x1, i, va, pte, log_size); | 495 | ia64_itr(0x1, i, va, pte, log_size); |
490 | ia64_srlz_i(); | 496 | ia64_srlz_i(); |
491 | p = &__per_cpu_idtrs[cpu][0][i]; | 497 | p = ia64_idtrs[cpu] + i; |
492 | p->ifa = va; | 498 | p->ifa = va; |
493 | p->pte = pte; | 499 | p->pte = pte; |
494 | p->itir = log_size << 2; | 500 | p->itir = log_size << 2; |
@@ -497,7 +503,7 @@ found: | |||
497 | if (target_mask & 0x2) { | 503 | if (target_mask & 0x2) { |
498 | ia64_itr(0x2, i, va, pte, log_size); | 504 | ia64_itr(0x2, i, va, pte, log_size); |
499 | ia64_srlz_i(); | 505 | ia64_srlz_i(); |
500 | p = &__per_cpu_idtrs[cpu][1][i]; | 506 | p = ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i; |
501 | p->ifa = va; | 507 | p->ifa = va; |
502 | p->pte = pte; | 508 | p->pte = pte; |
503 | p->itir = log_size << 2; | 509 | p->itir = log_size << 2; |
@@ -528,7 +534,7 @@ void ia64_ptr_entry(u64 target_mask, int slot) | |||
528 | return; | 534 | return; |
529 | 535 | ||
530 | if (target_mask & 0x1) { | 536 | if (target_mask & 0x1) { |
531 | p = &__per_cpu_idtrs[cpu][0][slot]; | 537 | p = ia64_idtrs[cpu] + slot; |
532 | if ((p->pte&0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) { | 538 | if ((p->pte&0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) { |
533 | p->pte = 0; | 539 | p->pte = 0; |
534 | ia64_ptr(0x1, p->ifa, p->itir>>2); | 540 | ia64_ptr(0x1, p->ifa, p->itir>>2); |
@@ -537,7 +543,7 @@ void ia64_ptr_entry(u64 target_mask, int slot) | |||
537 | } | 543 | } |
538 | 544 | ||
539 | if (target_mask & 0x2) { | 545 | if (target_mask & 0x2) { |
540 | p = &__per_cpu_idtrs[cpu][1][slot]; | 546 | p = ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + slot; |
541 | if ((p->pte & 0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) { | 547 | if ((p->pte & 0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) { |
542 | p->pte = 0; | 548 | p->pte = 0; |
543 | ia64_ptr(0x2, p->ifa, p->itir>>2); | 549 | ia64_ptr(0x2, p->ifa, p->itir>>2); |
@@ -546,8 +552,8 @@ void ia64_ptr_entry(u64 target_mask, int slot) | |||
546 | } | 552 | } |
547 | 553 | ||
548 | for (i = per_cpu(ia64_tr_used, cpu); i >= IA64_TR_ALLOC_BASE; i--) { | 554 | for (i = per_cpu(ia64_tr_used, cpu); i >= IA64_TR_ALLOC_BASE; i--) { |
549 | if ((__per_cpu_idtrs[cpu][0][i].pte & 0x1) || | 555 | if (((ia64_idtrs[cpu] + i)->pte & 0x1) || |
550 | (__per_cpu_idtrs[cpu][1][i].pte & 0x1)) | 556 | ((ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i)->pte & 0x1)) |
551 | break; | 557 | break; |
552 | } | 558 | } |
553 | per_cpu(ia64_tr_used, cpu) = i; | 559 | per_cpu(ia64_tr_used, cpu) = i; |
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index ece1bf994499..e456f062f241 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second); | |||
71 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | 71 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); |
72 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); | 72 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); |
73 | 73 | ||
74 | DEFINE_PER_CPU(short [MAX_COMPACT_NODES], __sn_cnodeid_to_nasid); | 74 | DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]); |
75 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); | 75 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); |
76 | 76 | ||
77 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); | 77 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); |