Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21549
b: refs/heads/master
c: 8935dce
h: refs/heads/master
i:
  21547: 28d18f7
v: v3
  • Loading branch information
David S. Miller committed Mar 20, 2006
1 parent 12800eb commit f76f056
Show file tree
Hide file tree
Showing 4 changed files with 30 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: 17b0e199a10184d8c5bbbd79a4cee993bb1fb257
refs/heads/master: 8935dced547afbf37d0fcfcac9a3556494e53104
9 changes: 9 additions & 0 deletions trunk/arch/sparc64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,15 @@ config SOLARIS_EMUL

endmenu

config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
depends on SMP
default y
help
SMT scheduler support improves the CPU scheduler's decision making
when dealing with UltraSPARC cpus at a cost of slightly increased
overhead in some places. If unsure say N here.

config CMDLINE_BOOL
bool "Default bootloader kernel arguments"

Expand Down
18 changes: 18 additions & 0 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ static unsigned char boot_cpu_id;

cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE;
cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE;
cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly =
{ [0 ... NR_CPUS-1] = CPU_MASK_NONE };
static cpumask_t smp_commenced_mask;
static cpumask_t cpu_callout_map;

Expand Down Expand Up @@ -1291,6 +1293,8 @@ int setup_profiling_timer(unsigned int multiplier)
/* Constrain the number of cpus to max_cpus. */
void __init smp_prepare_cpus(unsigned int max_cpus)
{
int i;

if (num_possible_cpus() > max_cpus) {
int instance, mid;

Expand All @@ -1305,6 +1309,20 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
}
}

for_each_cpu(i) {
if (tlb_type == hypervisor) {
int j;

/* XXX get this mapping from machine description */
for_each_cpu(j) {
if ((j >> 2) == (i >> 2))
cpu_set(j, cpu_sibling_map[i]);
}
} else {
cpu_set(i, cpu_sibling_map[i]);
}
}

smp_store_cpu_info(boot_cpu_id);
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-sparc64/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
extern cpumask_t phys_cpu_present_map;
#define cpu_possible_map phys_cpu_present_map

extern cpumask_t cpu_sibling_map[NR_CPUS];

/*
* General functions that each host system must provide.
*/
Expand Down

0 comments on commit f76f056

Please sign in to comment.