diff options
author | Mike Travis <travis@sgi.com> | 2008-12-31 20:34:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-03 12:53:31 -0500 |
commit | 7eb19553369c46cc1fa64caf120cbcab1b597f7c (patch) | |
tree | ef1a3beae706b9497c845d0a2557ceb4d2754998 /arch/ia64 | |
parent | 6092848a2a23b660150a38bc06f59d75838d70c8 (diff) | |
parent | 8c384cdee3e04d6194a2c2b192b624754f990835 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask
Conflicts:
arch/x86/kernel/io_apic.c
kernel/rcuclassic.c
kernel/sched.c
kernel/time/tick-sched.c
Signed-off-by: Mike Travis <travis@sgi.com>
[ mingo@elte.hu: backmerged typo fix for io_apic.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/hp/sim/simeth.c | 25 | ||||
-rw-r--r-- | arch/ia64/ia32/sys_ia32.c | 7 | ||||
-rw-r--r-- | arch/ia64/include/asm/topology.h | 9 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 23 | ||||
-rw-r--r-- | arch/ia64/kernel/mca_drv.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/sn/kernel/sn2/sn_hwperf.c | 27 |
9 files changed, 80 insertions, 63 deletions
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c index 3d47839a0c48..e4d8fde68103 100644 --- a/arch/ia64/hp/sim/simeth.c +++ b/arch/ia64/hp/sim/simeth.c | |||
@@ -167,6 +167,15 @@ netdev_read(int fd, unsigned char *buf, unsigned int len) | |||
167 | return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); | 167 | return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); |
168 | } | 168 | } |
169 | 169 | ||
170 | static const struct net_device_ops simeth_netdev_ops = { | ||
171 | .ndo_open = simeth_open, | ||
172 | .ndo_stop = simeth_close, | ||
173 | .ndo_start_xmit = simeth_tx, | ||
174 | .ndo_get_stats = simeth_get_stats, | ||
175 | .ndo_set_multicast_list = set_multicast_list, /* not yet used */ | ||
176 | |||
177 | }; | ||
178 | |||
170 | /* | 179 | /* |
171 | * Function shared with module code, so cannot be in init section | 180 | * Function shared with module code, so cannot be in init section |
172 | * | 181 | * |
@@ -206,14 +215,10 @@ simeth_probe1(void) | |||
206 | 215 | ||
207 | memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); | 216 | memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); |
208 | 217 | ||
209 | local = dev->priv; | 218 | local = netdev_priv(dev); |
210 | local->simfd = fd; /* keep track of underlying file descriptor */ | 219 | local->simfd = fd; /* keep track of underlying file descriptor */ |
211 | 220 | ||
212 | dev->open = simeth_open; | 221 | dev->netdev_ops = &simeth_netdev_ops; |
213 | dev->stop = simeth_close; | ||
214 | dev->hard_start_xmit = simeth_tx; | ||
215 | dev->get_stats = simeth_get_stats; | ||
216 | dev->set_multicast_list = set_multicast_list; /* no yet used */ | ||
217 | 222 | ||
218 | err = register_netdev(dev); | 223 | err = register_netdev(dev); |
219 | if (err) { | 224 | if (err) { |
@@ -325,7 +330,7 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr) | |||
325 | * we get DOWN then UP. | 330 | * we get DOWN then UP. |
326 | */ | 331 | */ |
327 | 332 | ||
328 | local = dev->priv; | 333 | local = netdev_priv(dev); |
329 | /* now do it for real */ | 334 | /* now do it for real */ |
330 | r = event == NETDEV_UP ? | 335 | r = event == NETDEV_UP ? |
331 | netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)): | 336 | netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)): |
@@ -380,7 +385,7 @@ frame_print(unsigned char *from, unsigned char *frame, int len) | |||
380 | static int | 385 | static int |
381 | simeth_tx(struct sk_buff *skb, struct net_device *dev) | 386 | simeth_tx(struct sk_buff *skb, struct net_device *dev) |
382 | { | 387 | { |
383 | struct simeth_local *local = dev->priv; | 388 | struct simeth_local *local = netdev_priv(dev); |
384 | 389 | ||
385 | #if 0 | 390 | #if 0 |
386 | /* ensure we have at least ETH_ZLEN bytes (min frame size) */ | 391 | /* ensure we have at least ETH_ZLEN bytes (min frame size) */ |
@@ -443,7 +448,7 @@ simeth_rx(struct net_device *dev) | |||
443 | int len; | 448 | int len; |
444 | int rcv_count = SIMETH_RECV_MAX; | 449 | int rcv_count = SIMETH_RECV_MAX; |
445 | 450 | ||
446 | local = dev->priv; | 451 | local = netdev_priv(dev); |
447 | /* | 452 | /* |
448 | * the loop concept has been borrowed from other drivers | 453 | * the loop concept has been borrowed from other drivers |
449 | * looks to me like it's a throttling thing to avoid pushing to many | 454 | * looks to me like it's a throttling thing to avoid pushing to many |
@@ -507,7 +512,7 @@ simeth_interrupt(int irq, void *dev_id) | |||
507 | static struct net_device_stats * | 512 | static struct net_device_stats * |
508 | simeth_get_stats(struct net_device *dev) | 513 | simeth_get_stats(struct net_device *dev) |
509 | { | 514 | { |
510 | struct simeth_local *local = dev->priv; | 515 | struct simeth_local *local = netdev_priv(dev); |
511 | 516 | ||
512 | return &local->stats; | 517 | return &local->stats; |
513 | } | 518 | } |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 5e92ae00bdbb..16ef61a91d95 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1767,25 +1767,24 @@ groups16_from_user(struct group_info *group_info, short __user *grouplist) | |||
1767 | asmlinkage long | 1767 | asmlinkage long |
1768 | sys32_getgroups16 (int gidsetsize, short __user *grouplist) | 1768 | sys32_getgroups16 (int gidsetsize, short __user *grouplist) |
1769 | { | 1769 | { |
1770 | const struct cred *cred = current_cred(); | ||
1770 | int i; | 1771 | int i; |
1771 | 1772 | ||
1772 | if (gidsetsize < 0) | 1773 | if (gidsetsize < 0) |
1773 | return -EINVAL; | 1774 | return -EINVAL; |
1774 | 1775 | ||
1775 | get_group_info(current->group_info); | 1776 | i = cred->group_info->ngroups; |
1776 | i = current->group_info->ngroups; | ||
1777 | if (gidsetsize) { | 1777 | if (gidsetsize) { |
1778 | if (i > gidsetsize) { | 1778 | if (i > gidsetsize) { |
1779 | i = -EINVAL; | 1779 | i = -EINVAL; |
1780 | goto out; | 1780 | goto out; |
1781 | } | 1781 | } |
1782 | if (groups16_to_user(grouplist, current->group_info)) { | 1782 | if (groups16_to_user(grouplist, cred->group_info)) { |
1783 | i = -EFAULT; | 1783 | i = -EFAULT; |
1784 | goto out; | 1784 | goto out; |
1785 | } | 1785 | } |
1786 | } | 1786 | } |
1787 | out: | 1787 | out: |
1788 | put_group_info(current->group_info); | ||
1789 | return i; | 1788 | return i; |
1790 | } | 1789 | } |
1791 | 1790 | ||
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index a3cc9f65f954..76a33a91ca69 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h | |||
@@ -34,6 +34,7 @@ | |||
34 | * Returns a bitmask of CPUs on Node 'node'. | 34 | * Returns a bitmask of CPUs on Node 'node'. |
35 | */ | 35 | */ |
36 | #define node_to_cpumask(node) (node_to_cpu_mask[node]) | 36 | #define node_to_cpumask(node) (node_to_cpu_mask[node]) |
37 | #define cpumask_of_node(node) (&node_to_cpu_mask[node]) | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * Returns the number of the node containing Node 'nid'. | 40 | * Returns the number of the node containing Node 'nid'. |
@@ -45,7 +46,7 @@ | |||
45 | /* | 46 | /* |
46 | * Returns the number of the first CPU on Node 'node'. | 47 | * Returns the number of the first CPU on Node 'node'. |
47 | */ | 48 | */ |
48 | #define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node))) | 49 | #define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node))) |
49 | 50 | ||
50 | /* | 51 | /* |
51 | * Determines the node for a given pci bus | 52 | * Determines the node for a given pci bus |
@@ -109,6 +110,8 @@ void build_cpu_to_node_map(void); | |||
109 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | 110 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) |
110 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 111 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
111 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 112 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
113 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
114 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | ||
112 | #define smt_capable() (smp_num_siblings > 1) | 115 | #define smt_capable() (smp_num_siblings > 1) |
113 | #endif | 116 | #endif |
114 | 117 | ||
@@ -119,6 +122,10 @@ extern void arch_fix_phys_package_id(int num, u32 slot); | |||
119 | node_to_cpumask(pcibus_to_node(bus)) \ | 122 | node_to_cpumask(pcibus_to_node(bus)) \ |
120 | ) | 123 | ) |
121 | 124 | ||
125 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | ||
126 | cpu_all_mask : \ | ||
127 | cpumask_from_node(pcibus_to_node(bus))) | ||
128 | |||
122 | #include <asm-generic/topology.h> | 129 | #include <asm-generic/topology.h> |
123 | 130 | ||
124 | #endif /* _ASM_IA64_TOPOLOGY_H */ | 131 | #endif /* _ASM_IA64_TOPOLOGY_H */ |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index bd7acc71e8a9..0553648b7595 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -202,7 +202,6 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size) | |||
202 | Boot-time Table Parsing | 202 | Boot-time Table Parsing |
203 | -------------------------------------------------------------------------- */ | 203 | -------------------------------------------------------------------------- */ |
204 | 204 | ||
205 | static int total_cpus __initdata; | ||
206 | static int available_cpus __initdata; | 205 | static int available_cpus __initdata; |
207 | struct acpi_table_madt *acpi_madt __initdata; | 206 | struct acpi_table_madt *acpi_madt __initdata; |
208 | static u8 has_8259; | 207 | static u8 has_8259; |
@@ -1001,7 +1000,7 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) | |||
1001 | node = pxm_to_node(pxm); | 1000 | node = pxm_to_node(pxm); |
1002 | 1001 | ||
1003 | if (node >= MAX_NUMNODES || !node_online(node) || | 1002 | if (node >= MAX_NUMNODES || !node_online(node) || |
1004 | cpus_empty(node_to_cpumask(node))) | 1003 | cpumask_empty(cpumask_of_node(node))) |
1005 | return AE_OK; | 1004 | return AE_OK; |
1006 | 1005 | ||
1007 | /* We know a gsi to node mapping! */ | 1006 | /* We know a gsi to node mapping! */ |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index c8adecd5b416..5cfd3d91001a 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -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/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/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/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 636588e7e068..be339477f906 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
@@ -385,7 +385,6 @@ static int sn_topology_show(struct seq_file *s, void *d) | |||
385 | int j; | 385 | int j; |
386 | const char *slabname; | 386 | const char *slabname; |
387 | int ordinal; | 387 | int ordinal; |
388 | cpumask_t cpumask; | ||
389 | char slice; | 388 | char slice; |
390 | struct cpuinfo_ia64 *c; | 389 | struct cpuinfo_ia64 *c; |
391 | struct sn_hwperf_port_info *ptdata; | 390 | struct sn_hwperf_port_info *ptdata; |
@@ -473,23 +472,21 @@ static int sn_topology_show(struct seq_file *s, void *d) | |||
473 | * CPUs on this node, if any | 472 | * CPUs on this node, if any |
474 | */ | 473 | */ |
475 | if (!SN_HWPERF_IS_IONODE(obj)) { | 474 | if (!SN_HWPERF_IS_IONODE(obj)) { |
476 | cpumask = node_to_cpumask(ordinal); | 475 | for_each_cpu_and(i, cpu_online_mask, |
477 | for_each_online_cpu(i) { | 476 | cpumask_of_node(ordinal)) { |
478 | if (cpu_isset(i, cpumask)) { | 477 | slice = 'a' + cpuid_to_slice(i); |
479 | slice = 'a' + cpuid_to_slice(i); | 478 | c = cpu_data(i); |
480 | c = cpu_data(i); | 479 | seq_printf(s, "cpu %d %s%c local" |
481 | seq_printf(s, "cpu %d %s%c local" | 480 | " freq %luMHz, arch ia64", |
482 | " freq %luMHz, arch ia64", | 481 | i, obj->location, slice, |
483 | i, obj->location, slice, | 482 | c->proc_freq / 1000000); |
484 | c->proc_freq / 1000000); | 483 | for_each_online_cpu(j) { |
485 | for_each_online_cpu(j) { | 484 | seq_printf(s, j ? ":%d" : ", dist %d", |
486 | seq_printf(s, j ? ":%d" : ", dist %d", | 485 | node_distance( |
487 | node_distance( | ||
488 | cpu_to_node(i), | 486 | cpu_to_node(i), |
489 | cpu_to_node(j))); | 487 | cpu_to_node(j))); |
490 | } | ||
491 | seq_putc(s, '\n'); | ||
492 | } | 488 | } |
489 | seq_putc(s, '\n'); | ||
493 | } | 490 | } |
494 | } | 491 | } |
495 | } | 492 | } |