Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191568
b: refs/heads/master
c: 10d3858
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed May 17, 2010
1 parent 55923c9 commit afc06f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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: 2dedf0d9eadf39660f2e1686b5d36e4a7515803f
refs/heads/master: 10d3858950557cd3cc05f647ede597114c610177
2 changes: 2 additions & 0 deletions trunk/arch/s390/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

const struct cpumask *cpu_coregroup_mask(unsigned int cpu);

extern unsigned char cpu_core_id[NR_CPUS];
extern cpumask_t cpu_core_map[NR_CPUS];

#define topology_core_id(cpu) (cpu_core_id[cpu])
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])

int topology_set_cpu_management(int fc);
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/s390/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ struct tl_cpu {
};

struct tl_container {
unsigned char reserved[8];
unsigned char reserved[7];
unsigned char id;
};

union tl_entry {
Expand All @@ -58,6 +59,7 @@ struct tl_info {

struct core_info {
struct core_info *next;
unsigned char id;
cpumask_t mask;
};

Expand All @@ -73,6 +75,7 @@ static DECLARE_WORK(topology_work, topology_work_fn);
static DEFINE_SPINLOCK(topology_lock);

cpumask_t cpu_core_map[NR_CPUS];
unsigned char cpu_core_id[NR_CPUS];

static cpumask_t cpu_coregroup_map(unsigned int cpu)
{
Expand Down Expand Up @@ -116,6 +119,7 @@ static void add_cpus_to_core(struct tl_cpu *tl_cpu, struct core_info *core)
for_each_present_cpu(lcpu) {
if (cpu_logical_map(lcpu) == rcpu) {
cpu_set(lcpu, core->mask);
cpu_core_id[lcpu] = core->id;
smp_cpu_polarization[lcpu] = tl_cpu->pp;
}
}
Expand Down Expand Up @@ -158,6 +162,7 @@ static void tl_to_cores(struct tl_info *info)
break;
case 1:
core = core->next;
core->id = tle->container.id;
break;
case 0:
add_cpus_to_core(&tle->cpu, core);
Expand Down

0 comments on commit afc06f9

Please sign in to comment.