Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36335
b: refs/heads/master
c: dd562c0
h: refs/heads/master
i:
  36333: 5170acd
  36331: 0542fab
  36327: 0b6db96
  36319: ff5e420
v: v3
  • Loading branch information
Stephane Eranian authored and Tony Luck committed Sep 26, 2006
1 parent 3d8c349 commit 66b31cd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd32cb3a9c9f9399421408e8734cd8a6d9d1a09f
refs/heads/master: dd562c05410e13e878a3ee0deb8ac06db2e132c7
24 changes: 24 additions & 0 deletions trunk/arch/ia64/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,3 +879,27 @@ identify_siblings(struct cpuinfo_ia64 *c)
c->core_id = info.log1_cid;
c->thread_id = info.log1_tid;
}

/*
* returns non zero, if multi-threading is enabled
* on at least one physical package. Due to hotplug cpu
* and (maxcpus=), all threads may not necessarily be enabled
* even though the processor supports multi-threading.
*/
int is_multithreading_enabled(void)
{
int i, j;

for_each_present_cpu(i) {
for_each_present_cpu(j) {
if (j == i)
continue;
if ((cpu_data(j)->socket_id == cpu_data(i)->socket_id)) {
if (cpu_data(j)->core_id == cpu_data(i)->core_id)
return 1;
}
}
}
return 0;
}
EXPORT_SYMBOL_GPL(is_multithreading_enabled);
1 change: 1 addition & 0 deletions trunk/include/asm-ia64/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ extern void smp_send_reschedule (int cpu);
extern void lock_ipi_calllock(void);
extern void unlock_ipi_calllock(void);
extern void identify_siblings (struct cpuinfo_ia64 *);
extern int is_multithreading_enabled(void);

#else

Expand Down

0 comments on commit 66b31cd

Please sign in to comment.