diff options
author | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
commit | b2576e1d4408e134e2188c967b1f28af39cd79d4 (patch) | |
tree | 004f3c82faab760f304ce031d6d2f572e7746a50 /arch/ia64/kernel | |
parent | 3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff) | |
parent | 2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff) |
Merge branch 'linus' into release
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/init_task.c | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 35 | ||||
-rw-r--r-- | arch/ia64/kernel/irq.c | 13 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 10 | ||||
-rw-r--r-- | arch/ia64/kernel/mca_drv.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/msi_ia64.c | 12 | ||||
-rw-r--r-- | arch/ia64/kernel/pci-dma.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 43 | ||||
-rw-r--r-- | arch/ia64/kernel/signal.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 10 | ||||
-rw-r--r-- | arch/ia64/kernel/time.c | 18 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 2 |
13 files changed, 80 insertions, 75 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index c19b686db9b8..d541671caf4a 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -203,7 +203,6 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size) | |||
203 | Boot-time Table Parsing | 203 | Boot-time Table Parsing |
204 | -------------------------------------------------------------------------- */ | 204 | -------------------------------------------------------------------------- */ |
205 | 205 | ||
206 | static int total_cpus __initdata; | ||
207 | static int available_cpus __initdata; | 206 | static int available_cpus __initdata; |
208 | struct acpi_table_madt *acpi_madt __initdata; | 207 | struct acpi_table_madt *acpi_madt __initdata; |
209 | static u8 has_8259; | 208 | static u8 has_8259; |
@@ -1002,7 +1001,7 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) | |||
1002 | node = pxm_to_node(pxm); | 1001 | node = pxm_to_node(pxm); |
1003 | 1002 | ||
1004 | if (node >= MAX_NUMNODES || !node_online(node) || | 1003 | if (node >= MAX_NUMNODES || !node_online(node) || |
1005 | cpus_empty(node_to_cpumask(node))) | 1004 | cpumask_empty(cpumask_of_node(node))) |
1006 | return AE_OK; | 1005 | return AE_OK; |
1007 | 1006 | ||
1008 | /* We know a gsi to node mapping! */ | 1007 | /* We know a gsi to node mapping! */ |
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c index 9d7e1c66faf4..5b0e830c6f33 100644 --- a/arch/ia64/kernel/init_task.c +++ b/arch/ia64/kernel/init_task.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
19 | 19 | ||
20 | static struct fs_struct init_fs = INIT_FS; | ||
21 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 20 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
22 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 21 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
23 | struct mm_struct init_mm = INIT_MM(init_mm); | 22 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 5c4674ae8aea..5cfd3d91001a 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -330,25 +330,25 @@ unmask_irq (unsigned int irq) | |||
330 | 330 | ||
331 | 331 | ||
332 | static void | 332 | static void |
333 | iosapic_set_affinity (unsigned int irq, cpumask_t mask) | 333 | iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) |
334 | { | 334 | { |
335 | #ifdef CONFIG_SMP | 335 | #ifdef CONFIG_SMP |
336 | u32 high32, low32; | 336 | u32 high32, low32; |
337 | int dest, rte_index; | 337 | int cpu, dest, rte_index; |
338 | int redir = (irq & IA64_IRQ_REDIRECTED) ? 1 : 0; | 338 | int redir = (irq & IA64_IRQ_REDIRECTED) ? 1 : 0; |
339 | struct iosapic_rte_info *rte; | 339 | struct iosapic_rte_info *rte; |
340 | struct iosapic *iosapic; | 340 | struct iosapic *iosapic; |
341 | 341 | ||
342 | irq &= (~IA64_IRQ_REDIRECTED); | 342 | irq &= (~IA64_IRQ_REDIRECTED); |
343 | 343 | ||
344 | cpus_and(mask, mask, cpu_online_map); | 344 | cpu = cpumask_first_and(cpu_online_mask, mask); |
345 | if (cpus_empty(mask)) | 345 | if (cpu >= nr_cpu_ids) |
346 | return; | 346 | return; |
347 | 347 | ||
348 | if (irq_prepare_move(irq, first_cpu(mask))) | 348 | if (irq_prepare_move(irq, cpu)) |
349 | return; | 349 | return; |
350 | 350 | ||
351 | dest = cpu_physical_id(first_cpu(mask)); | 351 | dest = cpu_physical_id(cpu); |
352 | 352 | ||
353 | if (!iosapic_intr_info[irq].count) | 353 | if (!iosapic_intr_info[irq].count) |
354 | return; /* not an IOSAPIC interrupt */ | 354 | return; /* not an IOSAPIC interrupt */ |
@@ -695,32 +695,31 @@ get_target_cpu (unsigned int gsi, int irq) | |||
695 | #ifdef CONFIG_NUMA | 695 | #ifdef CONFIG_NUMA |
696 | { | 696 | { |
697 | int num_cpus, cpu_index, iosapic_index, numa_cpu, i = 0; | 697 | int num_cpus, cpu_index, iosapic_index, numa_cpu, i = 0; |
698 | cpumask_t cpu_mask; | 698 | const struct cpumask *cpu_mask; |
699 | 699 | ||
700 | iosapic_index = find_iosapic(gsi); | 700 | iosapic_index = find_iosapic(gsi); |
701 | if (iosapic_index < 0 || | 701 | if (iosapic_index < 0 || |
702 | iosapic_lists[iosapic_index].node == MAX_NUMNODES) | 702 | iosapic_lists[iosapic_index].node == MAX_NUMNODES) |
703 | goto skip_numa_setup; | 703 | goto skip_numa_setup; |
704 | 704 | ||
705 | cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node); | 705 | cpu_mask = cpumask_of_node(iosapic_lists[iosapic_index].node); |
706 | cpus_and(cpu_mask, cpu_mask, domain); | 706 | num_cpus = 0; |
707 | for_each_cpu_mask(numa_cpu, cpu_mask) { | 707 | for_each_cpu_and(numa_cpu, cpu_mask, &domain) { |
708 | if (!cpu_online(numa_cpu)) | 708 | if (cpu_online(numa_cpu)) |
709 | cpu_clear(numa_cpu, cpu_mask); | 709 | num_cpus++; |
710 | } | 710 | } |
711 | 711 | ||
712 | num_cpus = cpus_weight(cpu_mask); | ||
713 | |||
714 | if (!num_cpus) | 712 | if (!num_cpus) |
715 | goto skip_numa_setup; | 713 | goto skip_numa_setup; |
716 | 714 | ||
717 | /* Use irq assignment to distribute across cpus in node */ | 715 | /* Use irq assignment to distribute across cpus in node */ |
718 | cpu_index = irq % num_cpus; | 716 | cpu_index = irq % num_cpus; |
719 | 717 | ||
720 | for (numa_cpu = first_cpu(cpu_mask) ; i < cpu_index ; i++) | 718 | for_each_cpu_and(numa_cpu, cpu_mask, &domain) |
721 | numa_cpu = next_cpu(numa_cpu, cpu_mask); | 719 | if (cpu_online(numa_cpu) && i++ >= cpu_index) |
720 | break; | ||
722 | 721 | ||
723 | if (numa_cpu != NR_CPUS) | 722 | if (numa_cpu < nr_cpu_ids) |
724 | return cpu_physical_id(numa_cpu); | 723 | return cpu_physical_id(numa_cpu); |
725 | } | 724 | } |
726 | skip_numa_setup: | 725 | skip_numa_setup: |
@@ -731,7 +730,7 @@ skip_numa_setup: | |||
731 | * case of NUMA.) | 730 | * case of NUMA.) |
732 | */ | 731 | */ |
733 | do { | 732 | do { |
734 | if (++cpu >= NR_CPUS) | 733 | if (++cpu >= nr_cpu_ids) |
735 | cpu = 0; | 734 | cpu = 0; |
736 | } while (!cpu_online(cpu) || !cpu_isset(cpu, domain)); | 735 | } while (!cpu_online(cpu) || !cpu_isset(cpu, domain)); |
737 | 736 | ||
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 7fd18f54c056..95ff16cb05d8 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -112,11 +112,11 @@ void set_irq_affinity_info (unsigned int irq, int hwid, int redir) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | bool is_affinity_mask_valid(cpumask_t cpumask) | 115 | bool is_affinity_mask_valid(cpumask_var_t cpumask) |
116 | { | 116 | { |
117 | if (ia64_platform_is("sn2")) { | 117 | if (ia64_platform_is("sn2")) { |
118 | /* Only allow one CPU to be specified in the smp_affinity mask */ | 118 | /* Only allow one CPU to be specified in the smp_affinity mask */ |
119 | if (cpus_weight(cpumask) != 1) | 119 | if (cpumask_weight(cpumask) != 1) |
120 | return false; | 120 | return false; |
121 | } | 121 | } |
122 | return true; | 122 | return true; |
@@ -133,7 +133,6 @@ unsigned int vectors_in_migration[NR_IRQS]; | |||
133 | */ | 133 | */ |
134 | static void migrate_irqs(void) | 134 | static void migrate_irqs(void) |
135 | { | 135 | { |
136 | cpumask_t mask; | ||
137 | irq_desc_t *desc; | 136 | irq_desc_t *desc; |
138 | int irq, new_cpu; | 137 | int irq, new_cpu; |
139 | 138 | ||
@@ -152,15 +151,14 @@ static void migrate_irqs(void) | |||
152 | if (desc->status == IRQ_PER_CPU) | 151 | if (desc->status == IRQ_PER_CPU) |
153 | continue; | 152 | continue; |
154 | 153 | ||
155 | cpus_and(mask, irq_desc[irq].affinity, cpu_online_map); | 154 | if (cpumask_any_and(&irq_desc[irq].affinity, cpu_online_mask) |
156 | if (any_online_cpu(mask) == NR_CPUS) { | 155 | >= nr_cpu_ids) { |
157 | /* | 156 | /* |
158 | * Save it for phase 2 processing | 157 | * Save it for phase 2 processing |
159 | */ | 158 | */ |
160 | vectors_in_migration[irq] = irq; | 159 | vectors_in_migration[irq] = irq; |
161 | 160 | ||
162 | new_cpu = any_online_cpu(cpu_online_map); | 161 | new_cpu = any_online_cpu(cpu_online_map); |
163 | mask = cpumask_of_cpu(new_cpu); | ||
164 | 162 | ||
165 | /* | 163 | /* |
166 | * Al three are essential, currently WARN_ON.. maybe panic? | 164 | * Al three are essential, currently WARN_ON.. maybe panic? |
@@ -168,7 +166,8 @@ static void migrate_irqs(void) | |||
168 | if (desc->chip && desc->chip->disable && | 166 | if (desc->chip && desc->chip->disable && |
169 | desc->chip->enable && desc->chip->set_affinity) { | 167 | desc->chip->enable && desc->chip->set_affinity) { |
170 | desc->chip->disable(irq); | 168 | desc->chip->disable(irq); |
171 | desc->chip->set_affinity(irq, mask); | 169 | desc->chip->set_affinity(irq, |
170 | cpumask_of(new_cpu)); | ||
172 | desc->chip->enable(irq); | 171 | desc->chip->enable(irq); |
173 | } else { | 172 | } else { |
174 | WARN_ON((!(desc->chip) || !(desc->chip->disable) || | 173 | WARN_ON((!(desc->chip) || !(desc->chip->disable) || |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index f07688da947c..f90be51b1123 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -434,7 +434,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
434 | /* | 434 | /* |
435 | * It is possible to have multiple instances associated with a given | 435 | * It is possible to have multiple instances associated with a given |
436 | * task either because an multiple functions in the call path | 436 | * task either because an multiple functions in the call path |
437 | * have a return probe installed on them, and/or more then one return | 437 | * have a return probe installed on them, and/or more than one return |
438 | * return probe was registered for a target function. | 438 | * return probe was registered for a target function. |
439 | * | 439 | * |
440 | * We can handle this because: | 440 | * We can handle this because: |
@@ -670,9 +670,11 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
670 | 670 | ||
671 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 671 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
672 | { | 672 | { |
673 | mutex_lock(&kprobe_mutex); | 673 | if (p->ainsn.insn) { |
674 | free_insn_slot(p->ainsn.insn, p->ainsn.inst_flag & INST_FLAG_BOOSTABLE); | 674 | free_insn_slot(p->ainsn.insn, |
675 | mutex_unlock(&kprobe_mutex); | 675 | p->ainsn.inst_flag & INST_FLAG_BOOSTABLE); |
676 | p->ainsn.insn = NULL; | ||
677 | } | ||
676 | } | 678 | } |
677 | /* | 679 | /* |
678 | * We are resuming execution after a single step fault, so the pt_regs | 680 | * We are resuming execution after a single step fault, so the pt_regs |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index fab1d21a4f2c..f94aaa86933f 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -158,7 +158,7 @@ mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr) | |||
158 | ia64_mlogbuf_dump(); | 158 | ia64_mlogbuf_dump(); |
159 | printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, " | 159 | printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, " |
160 | "iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n", | 160 | "iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n", |
161 | raw_smp_processor_id(), current->pid, current->uid, | 161 | raw_smp_processor_id(), current->pid, current_uid(), |
162 | iip, ipsr, paddr, current->comm); | 162 | iip, ipsr, paddr, current->comm); |
163 | 163 | ||
164 | spin_lock(&mca_bh_lock); | 164 | spin_lock(&mca_bh_lock); |
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index 702a09c13238..890339339035 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c | |||
@@ -49,11 +49,12 @@ | |||
49 | static struct irq_chip ia64_msi_chip; | 49 | static struct irq_chip ia64_msi_chip; |
50 | 50 | ||
51 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
52 | static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask) | 52 | static void ia64_set_msi_irq_affinity(unsigned int irq, |
53 | const cpumask_t *cpu_mask) | ||
53 | { | 54 | { |
54 | struct msi_msg msg; | 55 | struct msi_msg msg; |
55 | u32 addr, data; | 56 | u32 addr, data; |
56 | int cpu = first_cpu(cpu_mask); | 57 | int cpu = first_cpu(*cpu_mask); |
57 | 58 | ||
58 | if (!cpu_online(cpu)) | 59 | if (!cpu_online(cpu)) |
59 | return; | 60 | return; |
@@ -166,12 +167,11 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
166 | 167 | ||
167 | #ifdef CONFIG_DMAR | 168 | #ifdef CONFIG_DMAR |
168 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
169 | static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) | 170 | static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) |
170 | { | 171 | { |
171 | struct irq_cfg *cfg = irq_cfg + irq; | 172 | struct irq_cfg *cfg = irq_cfg + irq; |
172 | struct msi_msg msg; | 173 | struct msi_msg msg; |
173 | int cpu = first_cpu(mask); | 174 | int cpu = cpumask_first(mask); |
174 | |||
175 | 175 | ||
176 | if (!cpu_online(cpu)) | 176 | if (!cpu_online(cpu)) |
177 | return; | 177 | return; |
@@ -187,7 +187,7 @@ static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) | |||
187 | msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu)); | 187 | msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu)); |
188 | 188 | ||
189 | dmar_msi_write(irq, &msg); | 189 | dmar_msi_write(irq, &msg); |
190 | irq_desc[irq].affinity = mask; | 190 | irq_desc[irq].affinity = *mask; |
191 | } | 191 | } |
192 | #endif /* CONFIG_SMP */ | 192 | #endif /* CONFIG_SMP */ |
193 | 193 | ||
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c index 2a92f637431d..d0ada067a4af 100644 --- a/arch/ia64/kernel/pci-dma.c +++ b/arch/ia64/kernel/pci-dma.c | |||
@@ -39,7 +39,7 @@ int iommu_detected __read_mostly; | |||
39 | be probably a smaller DMA mask, but this is bug-to-bug compatible | 39 | be probably a smaller DMA mask, but this is bug-to-bug compatible |
40 | to i386. */ | 40 | to i386. */ |
41 | struct device fallback_dev = { | 41 | struct device fallback_dev = { |
42 | .bus_id = "fallback device", | 42 | .init_name = "fallback device", |
43 | .coherent_dma_mask = DMA_32BIT_MASK, | 43 | .coherent_dma_mask = DMA_32BIT_MASK, |
44 | .dma_mask = &fallback_dev.coherent_dma_mask, | 44 | .dma_mask = &fallback_dev.coherent_dma_mask, |
45 | }; | 45 | }; |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 6543a5547c84..0e499757309b 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2220,8 +2220,8 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2220 | DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode)); | 2220 | DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode)); |
2221 | 2221 | ||
2222 | inode->i_mode = S_IFCHR|S_IRUGO; | 2222 | inode->i_mode = S_IFCHR|S_IRUGO; |
2223 | inode->i_uid = current->fsuid; | 2223 | inode->i_uid = current_fsuid(); |
2224 | inode->i_gid = current->fsgid; | 2224 | inode->i_gid = current_fsgid(); |
2225 | 2225 | ||
2226 | sprintf(name, "[%lu]", inode->i_ino); | 2226 | sprintf(name, "[%lu]", inode->i_ino); |
2227 | this.name = name; | 2227 | this.name = name; |
@@ -2399,22 +2399,33 @@ error_kmem: | |||
2399 | static int | 2399 | static int |
2400 | pfm_bad_permissions(struct task_struct *task) | 2400 | pfm_bad_permissions(struct task_struct *task) |
2401 | { | 2401 | { |
2402 | const struct cred *tcred; | ||
2403 | uid_t uid = current_uid(); | ||
2404 | gid_t gid = current_gid(); | ||
2405 | int ret; | ||
2406 | |||
2407 | rcu_read_lock(); | ||
2408 | tcred = __task_cred(task); | ||
2409 | |||
2402 | /* inspired by ptrace_attach() */ | 2410 | /* inspired by ptrace_attach() */ |
2403 | DPRINT(("cur: uid=%d gid=%d task: euid=%d suid=%d uid=%d egid=%d sgid=%d\n", | 2411 | DPRINT(("cur: uid=%d gid=%d task: euid=%d suid=%d uid=%d egid=%d sgid=%d\n", |
2404 | current->uid, | 2412 | uid, |
2405 | current->gid, | 2413 | gid, |
2406 | task->euid, | 2414 | tcred->euid, |
2407 | task->suid, | 2415 | tcred->suid, |
2408 | task->uid, | 2416 | tcred->uid, |
2409 | task->egid, | 2417 | tcred->egid, |
2410 | task->sgid)); | 2418 | tcred->sgid)); |
2411 | 2419 | ||
2412 | return ((current->uid != task->euid) | 2420 | ret = ((uid != tcred->euid) |
2413 | || (current->uid != task->suid) | 2421 | || (uid != tcred->suid) |
2414 | || (current->uid != task->uid) | 2422 | || (uid != tcred->uid) |
2415 | || (current->gid != task->egid) | 2423 | || (gid != tcred->egid) |
2416 | || (current->gid != task->sgid) | 2424 | || (gid != tcred->sgid) |
2417 | || (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE); | 2425 | || (gid != tcred->gid)) && !capable(CAP_SYS_PTRACE); |
2426 | |||
2427 | rcu_read_unlock(); | ||
2428 | return ret; | ||
2418 | } | 2429 | } |
2419 | 2430 | ||
2420 | static int | 2431 | static int |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index e12500a9c443..e1821ca4c7df 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -229,7 +229,7 @@ ia64_rt_sigreturn (struct sigscratch *scr) | |||
229 | si.si_errno = 0; | 229 | si.si_errno = 0; |
230 | si.si_code = SI_KERNEL; | 230 | si.si_code = SI_KERNEL; |
231 | si.si_pid = task_pid_vnr(current); | 231 | si.si_pid = task_pid_vnr(current); |
232 | si.si_uid = current->uid; | 232 | si.si_uid = current_uid(); |
233 | si.si_addr = sc; | 233 | si.si_addr = sc; |
234 | force_sig_info(SIGSEGV, &si, current); | 234 | force_sig_info(SIGSEGV, &si, current); |
235 | return retval; | 235 | return retval; |
@@ -326,7 +326,7 @@ force_sigsegv_info (int sig, void __user *addr) | |||
326 | si.si_errno = 0; | 326 | si.si_errno = 0; |
327 | si.si_code = SI_KERNEL; | 327 | si.si_code = SI_KERNEL; |
328 | si.si_pid = task_pid_vnr(current); | 328 | si.si_pid = task_pid_vnr(current); |
329 | si.si_uid = current->uid; | 329 | si.si_uid = current_uid(); |
330 | si.si_addr = addr; | 330 | si.si_addr = addr; |
331 | force_sig_info(SIGSEGV, &si, current); | 331 | force_sig_info(SIGSEGV, &si, current); |
332 | return 0; | 332 | return 0; |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 1dcbb85fc4ee..11463994a7d5 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -131,12 +131,6 @@ struct task_struct *task_for_booting_cpu; | |||
131 | */ | 131 | */ |
132 | DEFINE_PER_CPU(int, cpu_state); | 132 | DEFINE_PER_CPU(int, cpu_state); |
133 | 133 | ||
134 | /* Bitmasks of currently online, and possible CPUs */ | ||
135 | cpumask_t cpu_online_map; | ||
136 | EXPORT_SYMBOL(cpu_online_map); | ||
137 | cpumask_t cpu_possible_map = CPU_MASK_NONE; | ||
138 | EXPORT_SYMBOL(cpu_possible_map); | ||
139 | |||
140 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; | 134 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; |
141 | EXPORT_SYMBOL(cpu_core_map); | 135 | EXPORT_SYMBOL(cpu_core_map); |
142 | DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); | 136 | DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); |
@@ -688,7 +682,7 @@ int migrate_platform_irqs(unsigned int cpu) | |||
688 | { | 682 | { |
689 | int new_cpei_cpu; | 683 | int new_cpei_cpu; |
690 | irq_desc_t *desc = NULL; | 684 | irq_desc_t *desc = NULL; |
691 | cpumask_t mask; | 685 | const struct cpumask *mask; |
692 | int retval = 0; | 686 | int retval = 0; |
693 | 687 | ||
694 | /* | 688 | /* |
@@ -701,7 +695,7 @@ int migrate_platform_irqs(unsigned int cpu) | |||
701 | * Now re-target the CPEI to a different processor | 695 | * Now re-target the CPEI to a different processor |
702 | */ | 696 | */ |
703 | new_cpei_cpu = any_online_cpu(cpu_online_map); | 697 | new_cpei_cpu = any_online_cpu(cpu_online_map); |
704 | mask = cpumask_of_cpu(new_cpei_cpu); | 698 | mask = cpumask_of(new_cpei_cpu); |
705 | set_cpei_target_cpu(new_cpei_cpu); | 699 | set_cpei_target_cpu(new_cpei_cpu); |
706 | desc = irq_desc + ia64_cpe_irq; | 700 | desc = irq_desc + ia64_cpe_irq; |
707 | /* | 701 | /* |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 65c10a42c88f..f0ebb342409d 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -93,13 +93,14 @@ void ia64_account_on_switch(struct task_struct *prev, struct task_struct *next) | |||
93 | now = ia64_get_itc(); | 93 | now = ia64_get_itc(); |
94 | 94 | ||
95 | delta_stime = cycle_to_cputime(pi->ac_stime + (now - pi->ac_stamp)); | 95 | delta_stime = cycle_to_cputime(pi->ac_stime + (now - pi->ac_stamp)); |
96 | account_system_time(prev, 0, delta_stime); | 96 | if (idle_task(smp_processor_id()) != prev) |
97 | account_system_time_scaled(prev, delta_stime); | 97 | account_system_time(prev, 0, delta_stime, delta_stime); |
98 | else | ||
99 | account_idle_time(delta_stime); | ||
98 | 100 | ||
99 | if (pi->ac_utime) { | 101 | if (pi->ac_utime) { |
100 | delta_utime = cycle_to_cputime(pi->ac_utime); | 102 | delta_utime = cycle_to_cputime(pi->ac_utime); |
101 | account_user_time(prev, delta_utime); | 103 | account_user_time(prev, delta_utime, delta_utime); |
102 | account_user_time_scaled(prev, delta_utime); | ||
103 | } | 104 | } |
104 | 105 | ||
105 | pi->ac_stamp = ni->ac_stamp = now; | 106 | pi->ac_stamp = ni->ac_stamp = now; |
@@ -122,8 +123,10 @@ void account_system_vtime(struct task_struct *tsk) | |||
122 | now = ia64_get_itc(); | 123 | now = ia64_get_itc(); |
123 | 124 | ||
124 | delta_stime = cycle_to_cputime(ti->ac_stime + (now - ti->ac_stamp)); | 125 | delta_stime = cycle_to_cputime(ti->ac_stime + (now - ti->ac_stamp)); |
125 | account_system_time(tsk, 0, delta_stime); | 126 | if (irq_count() || idle_task(smp_processor_id()) != tsk) |
126 | account_system_time_scaled(tsk, delta_stime); | 127 | account_system_time(tsk, 0, delta_stime, delta_stime); |
128 | else | ||
129 | account_idle_time(delta_stime); | ||
127 | ti->ac_stime = 0; | 130 | ti->ac_stime = 0; |
128 | 131 | ||
129 | ti->ac_stamp = now; | 132 | ti->ac_stamp = now; |
@@ -143,8 +146,7 @@ void account_process_tick(struct task_struct *p, int user_tick) | |||
143 | 146 | ||
144 | if (ti->ac_utime) { | 147 | if (ti->ac_utime) { |
145 | delta_utime = cycle_to_cputime(ti->ac_utime); | 148 | delta_utime = cycle_to_cputime(ti->ac_utime); |
146 | account_user_time(p, delta_utime); | 149 | account_user_time(p, delta_utime, delta_utime); |
147 | account_user_time_scaled(p, delta_utime); | ||
148 | ti->ac_utime = 0; | 150 | ti->ac_utime = 0; |
149 | } | 151 | } |
150 | } | 152 | } |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index c75b914f2d6b..a8d61a3e9a94 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -219,7 +219,7 @@ static ssize_t show_shared_cpu_map(struct cache_info *this_leaf, char *buf) | |||
219 | cpumask_t shared_cpu_map; | 219 | cpumask_t shared_cpu_map; |
220 | 220 | ||
221 | cpus_and(shared_cpu_map, this_leaf->shared_cpu_map, cpu_online_map); | 221 | cpus_and(shared_cpu_map, this_leaf->shared_cpu_map, cpu_online_map); |
222 | len = cpumask_scnprintf(buf, NR_CPUS+1, shared_cpu_map); | 222 | len = cpumask_scnprintf(buf, NR_CPUS+1, &shared_cpu_map); |
223 | len += sprintf(buf+len, "\n"); | 223 | len += sprintf(buf+len, "\n"); |
224 | return len; | 224 | return len; |
225 | } | 225 | } |