diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-28 16:40:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-28 16:48:38 -0400 |
commit | 7c730ccdc1188b97f5c8cb690906242c7ed75c22 (patch) | |
tree | 17ccd927e70dadaf59104c53cce892474eb539b2 /arch/ia64 | |
parent | 8d735b4148d46446e64d72b22ef0344ee8dc02fa (diff) | |
parent | 82268da1b130f763d22d04f7d016bbf6fc8815c2 (diff) |
Merge branch 'percpu-cpumask-x86-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'percpu-cpumask-x86-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (682 commits)
percpu: fix spurious alignment WARN in legacy SMP percpu allocator
percpu: generalize embedding first chunk setup helper
percpu: more flexibility for @dyn_size of pcpu_setup_first_chunk()
percpu: make x86 addr <-> pcpu ptr conversion macros generic
linker script: define __per_cpu_load on all SMP capable archs
x86: UV: remove uv_flush_tlb_others() WARN_ON
percpu: finer grained locking to break deadlock and allow atomic free
percpu: move fully free chunk reclamation into a work
percpu: move chunk area map extension out of area allocation
percpu: replace pcpu_realloc() with pcpu_mem_alloc() and pcpu_mem_free()
x86, percpu: setup reserved percpu area for x86_64
percpu, module: implement reserved allocation and use it for module percpu variables
percpu: add an indirection ptr for chunk page map access
x86: make embedding percpu allocator return excessive free space
percpu: use negative for auto for pcpu_setup_first_chunk() arguments
percpu: improve first chunk initial area map handling
percpu: cosmetic renames in pcpu_setup_first_chunk()
percpu: clean up percpu constants
x86: un-__init fill_pud/pmd/pte
x86: remove vestigial fix_ioremap prototypes
...
Manually merge conflicts in arch/ia64/kernel/irq_ia64.c
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/include/asm/percpu.h | 4 | ||||
-rw-r--r-- | arch/ia64/include/asm/topology.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/uv/uv.h | 13 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 14 | ||||
-rw-r--r-- | arch/ia64/kernel/msi_ia64.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/vmlinux.lds.S | 11 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/msi_sn.c | 2 |
10 files changed, 34 insertions, 26 deletions
diff --git a/arch/ia64/include/asm/percpu.h b/arch/ia64/include/asm/percpu.h index 77f30b664b4e..30cf46534dd2 100644 --- a/arch/ia64/include/asm/percpu.h +++ b/arch/ia64/include/asm/percpu.h | |||
@@ -27,12 +27,12 @@ extern void *per_cpu_init(void); | |||
27 | 27 | ||
28 | #else /* ! SMP */ | 28 | #else /* ! SMP */ |
29 | 29 | ||
30 | #define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu"))) | ||
31 | |||
32 | #define per_cpu_init() (__phys_per_cpu_start) | 30 | #define per_cpu_init() (__phys_per_cpu_start) |
33 | 31 | ||
34 | #endif /* SMP */ | 32 | #endif /* SMP */ |
35 | 33 | ||
34 | #define PER_CPU_BASE_SECTION ".data.percpu" | ||
35 | |||
36 | /* | 36 | /* |
37 | * Be extremely careful when taking the address of this variable! Due to virtual | 37 | * Be extremely careful when taking the address of this variable! Due to virtual |
38 | * remapping, it is different from the canonical address returned by __get_cpu_var(var)! | 38 | * remapping, it is different from the canonical address returned by __get_cpu_var(var)! |
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 32f3af1641c5..3193f4417e16 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h | |||
@@ -84,7 +84,7 @@ void build_cpu_to_node_map(void); | |||
84 | .child = NULL, \ | 84 | .child = NULL, \ |
85 | .groups = NULL, \ | 85 | .groups = NULL, \ |
86 | .min_interval = 8, \ | 86 | .min_interval = 8, \ |
87 | .max_interval = 8*(min(num_online_cpus(), 32)), \ | 87 | .max_interval = 8*(min(num_online_cpus(), 32U)), \ |
88 | .busy_factor = 64, \ | 88 | .busy_factor = 64, \ |
89 | .imbalance_pct = 125, \ | 89 | .imbalance_pct = 125, \ |
90 | .cache_nice_tries = 2, \ | 90 | .cache_nice_tries = 2, \ |
diff --git a/arch/ia64/include/asm/uv/uv.h b/arch/ia64/include/asm/uv/uv.h new file mode 100644 index 000000000000..61b5bdfd980e --- /dev/null +++ b/arch/ia64/include/asm/uv/uv.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _ASM_IA64_UV_UV_H | ||
2 | #define _ASM_IA64_UV_UV_H | ||
3 | |||
4 | #include <asm/system.h> | ||
5 | #include <asm/sn/simulator.h> | ||
6 | |||
7 | static inline int is_uv_system(void) | ||
8 | { | ||
9 | /* temporary support for running on hardware simulator */ | ||
10 | return IS_MEDUSA() || ia64_platform_is("uv"); | ||
11 | } | ||
12 | |||
13 | #endif /* _ASM_IA64_UV_UV_H */ | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index d541671caf4a..bdef2ce38c8b 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -199,6 +199,10 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size) | |||
199 | return __va(phys_addr); | 199 | return __va(phys_addr); |
200 | } | 200 | } |
201 | 201 | ||
202 | void __init __acpi_unmap_table(char *map, unsigned long size) | ||
203 | { | ||
204 | } | ||
205 | |||
202 | /* -------------------------------------------------------------------------- | 206 | /* -------------------------------------------------------------------------- |
203 | Boot-time Table Parsing | 207 | Boot-time Table Parsing |
204 | -------------------------------------------------------------------------- */ | 208 | -------------------------------------------------------------------------- */ |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index e13125058bed..166e0d839fa0 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -880,7 +880,7 @@ iosapic_unregister_intr (unsigned int gsi) | |||
880 | if (iosapic_intr_info[irq].count == 0) { | 880 | if (iosapic_intr_info[irq].count == 0) { |
881 | #ifdef CONFIG_SMP | 881 | #ifdef CONFIG_SMP |
882 | /* Clear affinity */ | 882 | /* Clear affinity */ |
883 | cpus_setall(idesc->affinity); | 883 | cpumask_setall(idesc->affinity); |
884 | #endif | 884 | #endif |
885 | /* Clear the interrupt information */ | 885 | /* Clear the interrupt information */ |
886 | iosapic_intr_info[irq].dest = 0; | 886 | iosapic_intr_info[irq].dest = 0; |
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 4f596613bffd..7429752ef5ad 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -103,7 +103,7 @@ static char irq_redir [NR_IRQS]; // = { [0 ... NR_IRQS-1] = 1 }; | |||
103 | void set_irq_affinity_info (unsigned int irq, int hwid, int redir) | 103 | void set_irq_affinity_info (unsigned int irq, int hwid, int redir) |
104 | { | 104 | { |
105 | if (irq < NR_IRQS) { | 105 | if (irq < NR_IRQS) { |
106 | cpumask_copy(&irq_desc[irq].affinity, | 106 | cpumask_copy(irq_desc[irq].affinity, |
107 | cpumask_of(cpu_logical_id(hwid))); | 107 | cpumask_of(cpu_logical_id(hwid))); |
108 | irq_redir[irq] = (char) (redir & 0xff); | 108 | irq_redir[irq] = (char) (redir & 0xff); |
109 | } | 109 | } |
@@ -148,7 +148,7 @@ static void migrate_irqs(void) | |||
148 | if (desc->status == IRQ_PER_CPU) | 148 | if (desc->status == IRQ_PER_CPU) |
149 | continue; | 149 | continue; |
150 | 150 | ||
151 | if (cpumask_any_and(&irq_desc[irq].affinity, cpu_online_mask) | 151 | if (cpumask_any_and(irq_desc[irq].affinity, cpu_online_mask) |
152 | >= nr_cpu_ids) { | 152 | >= nr_cpu_ids) { |
153 | /* | 153 | /* |
154 | * Save it for phase 2 processing | 154 | * Save it for phase 2 processing |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 977a6ef13320..acc4d19ae62a 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -493,16 +493,15 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) | |||
493 | saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); | 493 | saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); |
494 | ia64_srlz_d(); | 494 | ia64_srlz_d(); |
495 | while (vector != IA64_SPURIOUS_INT_VECTOR) { | 495 | while (vector != IA64_SPURIOUS_INT_VECTOR) { |
496 | struct irq_desc *desc; | ||
497 | int irq = local_vector_to_irq(vector); | 496 | int irq = local_vector_to_irq(vector); |
497 | struct irq_desc *desc = irq_to_desc(irq); | ||
498 | 498 | ||
499 | desc = irq_desc + irq; | ||
500 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { | 499 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { |
501 | smp_local_flush_tlb(); | 500 | smp_local_flush_tlb(); |
502 | kstat_incr_irqs_this_cpu(irq, desc); | 501 | kstat_incr_irqs_this_cpu(irq, desc); |
503 | } else if (unlikely(IS_RESCHEDULE(vector))) | 502 | } else if (unlikely(IS_RESCHEDULE(vector))) { |
504 | kstat_incr_irqs_this_cpu(irq, desc); | 503 | kstat_incr_irqs_this_cpu(irq, desc); |
505 | else { | 504 | } else { |
506 | ia64_setreg(_IA64_REG_CR_TPR, vector); | 505 | ia64_setreg(_IA64_REG_CR_TPR, vector); |
507 | ia64_srlz_d(); | 506 | ia64_srlz_d(); |
508 | 507 | ||
@@ -553,16 +552,15 @@ void ia64_process_pending_intr(void) | |||
553 | * Perform normal interrupt style processing | 552 | * Perform normal interrupt style processing |
554 | */ | 553 | */ |
555 | while (vector != IA64_SPURIOUS_INT_VECTOR) { | 554 | while (vector != IA64_SPURIOUS_INT_VECTOR) { |
556 | struct irq_desc *desc; | ||
557 | int irq = local_vector_to_irq(vector); | 555 | int irq = local_vector_to_irq(vector); |
558 | desc = irq_desc + irq; | 556 | struct irq_desc *desc = irq_to_desc(irq); |
559 | 557 | ||
560 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { | 558 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { |
561 | smp_local_flush_tlb(); | 559 | smp_local_flush_tlb(); |
562 | kstat_incr_irqs_this_cpu(irq, desc); | 560 | kstat_incr_irqs_this_cpu(irq, desc); |
563 | } else if (unlikely(IS_RESCHEDULE(vector))) | 561 | } else if (unlikely(IS_RESCHEDULE(vector))) { |
564 | kstat_incr_irqs_this_cpu(irq, desc); | 562 | kstat_incr_irqs_this_cpu(irq, desc); |
565 | else { | 563 | } else { |
566 | struct pt_regs *old_regs = set_irq_regs(NULL); | 564 | struct pt_regs *old_regs = set_irq_regs(NULL); |
567 | 565 | ||
568 | ia64_setreg(_IA64_REG_CR_TPR, vector); | 566 | ia64_setreg(_IA64_REG_CR_TPR, vector); |
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index 368ee4e5266d..2b15e233f7fe 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c | |||
@@ -38,7 +38,7 @@ static void ia64_set_msi_irq_affinity(unsigned int irq, | |||
38 | msg.data = data; | 38 | msg.data = data; |
39 | 39 | ||
40 | write_msi_msg(irq, &msg); | 40 | write_msi_msg(irq, &msg); |
41 | irq_desc[irq].affinity = cpumask_of_cpu(cpu); | 41 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); |
42 | } | 42 | } |
43 | #endif /* CONFIG_SMP */ | 43 | #endif /* CONFIG_SMP */ |
44 | 44 | ||
@@ -150,7 +150,7 @@ static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
150 | msg.address_lo |= MSI_ADDR_DEST_ID_CPU(cpu_physical_id(cpu)); | 150 | msg.address_lo |= MSI_ADDR_DEST_ID_CPU(cpu_physical_id(cpu)); |
151 | 151 | ||
152 | dmar_msi_write(irq, &msg); | 152 | dmar_msi_write(irq, &msg); |
153 | irq_desc[irq].affinity = *mask; | 153 | cpumask_copy(irq_desc[irq].affinity, mask); |
154 | } | 154 | } |
155 | #endif /* CONFIG_SMP */ | 155 | #endif /* CONFIG_SMP */ |
156 | 156 | ||
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 10a7d47e8510..3765efc5f963 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -213,16 +213,9 @@ SECTIONS | |||
213 | { *(.data.cacheline_aligned) } | 213 | { *(.data.cacheline_aligned) } |
214 | 214 | ||
215 | /* Per-cpu data: */ | 215 | /* Per-cpu data: */ |
216 | percpu : { } :percpu | ||
217 | . = ALIGN(PERCPU_PAGE_SIZE); | 216 | . = ALIGN(PERCPU_PAGE_SIZE); |
218 | __phys_per_cpu_start = .; | 217 | PERCPU_VADDR(PERCPU_ADDR, :percpu) |
219 | .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) | 218 | __phys_per_cpu_start = __per_cpu_load; |
220 | { | ||
221 | __per_cpu_start = .; | ||
222 | *(.data.percpu) | ||
223 | *(.data.percpu.shared_aligned) | ||
224 | __per_cpu_end = .; | ||
225 | } | ||
226 | . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits | 219 | . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits |
227 | * into percpu page size | 220 | * into percpu page size |
228 | */ | 221 | */ |
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c index ca553b0429ce..81e428943d73 100644 --- a/arch/ia64/sn/kernel/msi_sn.c +++ b/arch/ia64/sn/kernel/msi_sn.c | |||
@@ -205,7 +205,7 @@ static void sn_set_msi_irq_affinity(unsigned int irq, | |||
205 | msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff); | 205 | msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff); |
206 | 206 | ||
207 | write_msi_msg(irq, &msg); | 207 | write_msi_msg(irq, &msg); |
208 | irq_desc[irq].affinity = *cpu_mask; | 208 | cpumask_copy(irq_desc[irq].affinity, cpu_mask); |
209 | } | 209 | } |
210 | #endif /* CONFIG_SMP */ | 210 | #endif /* CONFIG_SMP */ |
211 | 211 | ||