Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179281
b: refs/heads/master
c: fb380aa
h: refs/heads/master
i:
  179279: 617b549
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 13, 2010
1 parent 2b2fcdb commit 86a915c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 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: 957a37ad587f3ef1022f1fe434d818cbed38eb95
refs/heads/master: fb380aadfe34e8d3ce628cb3e386882351940874
18 changes: 13 additions & 5 deletions trunk/arch/s390/include/asm/sigp.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@
#ifndef __SIGP__
#define __SIGP__

#include <asm/ptrace.h>
#include <asm/atomic.h>
#include <asm/system.h>

/* get real cpu address from logical cpu number */
extern int __cpu_logical_map[];

static inline int cpu_logical_map(int cpu)
{
#ifdef CONFIG_SMP
return __cpu_logical_map[cpu];
#else
return stap();
#endif
}

typedef enum
{
sigp_unassigned=0x0,
Expand Down Expand Up @@ -79,7 +87,7 @@ signal_processor(__u16 cpu_addr, sigp_order_code order_code)
" ipm %0\n"
" srl %0,28\n"
: "=d" (ccode)
: "d" (reg1), "d" (__cpu_logical_map[cpu_addr]),
: "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
"a" (order_code) : "cc" , "memory");
return ccode;
}
Expand All @@ -98,7 +106,7 @@ signal_processor_p(__u32 parameter, __u16 cpu_addr, sigp_order_code order_code)
" ipm %0\n"
" srl %0,28\n"
: "=d" (ccode)
: "d" (reg1), "d" (__cpu_logical_map[cpu_addr]),
: "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
"a" (order_code) : "cc" , "memory");
return ccode;
}
Expand All @@ -118,7 +126,7 @@ signal_processor_ps(__u32 *statusptr, __u32 parameter, __u16 cpu_addr,
" ipm %0\n"
" srl %0,28\n"
: "=d" (ccode), "+d" (reg1)
: "d" (__cpu_logical_map[cpu_addr]), "a" (order_code)
: "d" (cpu_logical_map(cpu_addr)), "a" (order_code)
: "cc" , "memory");
*statusptr = reg1;
return ccode;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ unsigned long elf_hwcap = 0;
char elf_platform[ELF_PLATFORM_SIZE];

struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS];
int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */

int __initdata memory_end_set;
unsigned long __initdata memory_end;
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
#include <asm/cpu.h>
#include "entry.h"

/* logical cpu to cpu address */
int __cpu_logical_map[NR_CPUS];

static struct task_struct *current_set[NR_CPUS];

static u8 smp_cpu_type;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static void add_cpus_to_core(struct tl_cpu *tl_cpu, struct core_info *core)

rcpu = CPU_BITS - 1 - cpu + tl_cpu->origin;
for_each_present_cpu(lcpu) {
if (__cpu_logical_map[lcpu] == rcpu) {
if (cpu_logical_map(lcpu) == rcpu) {
cpu_set(lcpu, core->mask);
smp_cpu_polarization[lcpu] = tl_cpu->pp;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/lib/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static inline void _raw_yield_cpu(int cpu)
{
if (MACHINE_HAS_DIAG9C)
asm volatile("diag %0,0,0x9c"
: : "d" (__cpu_logical_map[cpu]));
: : "d" (cpu_logical_map(cpu)));
else
_raw_yield();
}
Expand Down

0 comments on commit 86a915c

Please sign in to comment.