Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72909
b: refs/heads/master
c: 113134f
h: refs/heads/master
i:
  72907: dd60989
v: v3
  • Loading branch information
Alex Chiang authored and Tony Luck committed Oct 29, 2007
1 parent ca0bed3 commit 0588a54
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 50 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 172c51068499ed4a168a2b94eda9d1f160a396a1
refs/heads/master: 113134fcbca83619be4c68d0ca66db6093777b5d
49 changes: 8 additions & 41 deletions trunk/arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,34 +417,6 @@ mark_bsp_online (void)
#endif
}

#ifdef CONFIG_SMP
static void __init
check_for_logical_procs (void)
{
pal_logical_to_physical_t info;
s64 status;

status = ia64_pal_logical_to_phys(0, &info);
if (status == -1) {
printk(KERN_INFO "No logical to physical processor mapping "
"available\n");
return;
}
if (status) {
printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n",
status);
return;
}
/*
* Total number of siblings that BSP has. Though not all of them
* may have booted successfully. The correct number of siblings
* booted is in info.overview_num_log.
*/
smp_num_siblings = info.overview_tpc;
smp_num_cpucores = info.overview_cpp;
}
#endif

static __initdata int nomca;
static __init int setup_nomca(char *s)
{
Expand Down Expand Up @@ -540,15 +512,6 @@ setup_arch (char **cmdline_p)

#ifdef CONFIG_SMP
cpu_physical_id(0) = hard_smp_processor_id();
check_for_logical_procs();
if (smp_num_cpucores > 1)
printk(KERN_INFO
"cpu package is Multi-Core capable: number of cores=%d\n",
smp_num_cpucores);
if (smp_num_siblings > 1)
printk(KERN_INFO
"cpu package is Multi-Threading capable: number of siblings=%d\n",
smp_num_siblings);
#endif

cpu_init(); /* initialize the bootstrap CPU */
Expand Down Expand Up @@ -661,12 +624,13 @@ show_cpuinfo (struct seq_file *m, void *v)
lpj*HZ/500000, (lpj*HZ/5000) % 100);
#ifdef CONFIG_SMP
seq_printf(m, "siblings : %u\n", cpus_weight(cpu_core_map[cpunum]));
if (c->socket_id != -1)
seq_printf(m, "physical id: %u\n", c->socket_id);
if (c->threads_per_core > 1 || c->cores_per_socket > 1)
seq_printf(m,
"physical id: %u\n"
"core id : %u\n"
"thread id : %u\n",
c->socket_id, c->core_id, c->thread_id);
"core id : %u\n"
"thread id : %u\n",
c->core_id, c->thread_id);
#endif
seq_printf(m,"\n");

Expand Down Expand Up @@ -778,6 +742,9 @@ identify_cpu (struct cpuinfo_ia64 *c)
c->socket_id = -1;

identify_siblings(c);

if (c->threads_per_core > smp_num_siblings)
smp_num_siblings = c->threads_per_core;
#endif
c->ppn = cpuid.field.ppn;
c->number = cpuid.field.number;
Expand Down
21 changes: 14 additions & 7 deletions trunk/arch/ia64/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map);
EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);

int smp_num_siblings = 1;
int smp_num_cpucores = 1;

/* which logical CPU number maps to which CPU (physical APIC ID) */
volatile int ia64_cpu_to_sapicid[NR_CPUS];
Expand Down Expand Up @@ -886,20 +885,28 @@ identify_siblings(struct cpuinfo_ia64 *c)
u16 pltid;
pal_logical_to_physical_t info;

if (smp_num_cpucores == 1 && smp_num_siblings == 1)
return;

if ((status = ia64_pal_logical_to_phys(-1, &info)) != PAL_STATUS_SUCCESS) {
printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n",
status);
return;
if (status != PAL_STATUS_UNIMPLEMENTED) {
printk(KERN_ERR
"ia64_pal_logical_to_phys failed with %ld\n",
status);
return;
}

info.overview_ppid = 0;
info.overview_cpp = 1;
info.overview_tpc = 1;
}
if ((status = ia64_sal_physical_id_info(&pltid)) != PAL_STATUS_SUCCESS) {
printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status);
return;
}

c->socket_id = (pltid << 8) | info.overview_ppid;

if (info.overview_cpp == 1 && info.overview_tpc == 1)
return;

c->cores_per_socket = info.overview_cpp;
c->threads_per_core = info.overview_tpc;
c->num_log = info.overview_num_log;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-ia64/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ extern cpumask_t cpu_online_map;
extern cpumask_t cpu_core_map[NR_CPUS];
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
extern int smp_num_siblings;
extern int smp_num_cpucores;
extern void __iomem *ipi_base_addr;
extern unsigned char smp_int_redirect;

Expand Down

0 comments on commit 0588a54

Please sign in to comment.