Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114507
b: refs/heads/master
c: 41eba0a
h: refs/heads/master
i:
  114505: 72990d7
  114503: daaa485
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Aug 20, 2008
1 parent f380611 commit d616653
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 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: f3d3d307e6f577de3b384ef64ffb03c8b5676748
refs/heads/master: 41eba0ad0033967eda346dd833194e96fdf5f405
39 changes: 29 additions & 10 deletions trunk/arch/powerpc/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ extern int smp_hw_index[];

#define raw_smp_processor_id() (current_thread_info()->cpu)
#define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
#define get_hard_smp_processor_id(cpu) (smp_hw_index[(cpu)])
#define set_hard_smp_processor_id(cpu, phys)\
(smp_hw_index[(cpu)] = (phys))

static inline int get_hard_smp_processor_id(int cpu)
{
return smp_hw_index[cpu];
}

static inline void set_hard_smp_processor_id(int cpu, int phys)
{
smp_hw_index[cpu] = phys;
}
#endif

DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
Expand Down Expand Up @@ -92,20 +99,32 @@ extern void __cpu_die(unsigned int cpu);
#endif /* CONFIG_SMP */

#ifdef CONFIG_PPC64
#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id)
#define set_hard_smp_processor_id(CPU, VAL) \
do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0)
static inline int get_hard_smp_processor_id(int cpu)
{
return paca[cpu].hw_cpu_id;
}

static inline void set_hard_smp_processor_id(int cpu, int phys)
{
paca[cpu].hw_cpu_id = phys;
}

extern void smp_release_cpus(void);

#else
/* 32-bit */
#ifndef CONFIG_SMP
extern int boot_cpuid_phys;
#define get_hard_smp_processor_id(cpu) boot_cpuid_phys
#define set_hard_smp_processor_id(cpu, phys)
#endif
#endif
static inline int get_hard_smp_processor_id(int cpu)
{
return boot_cpuid_phys;
}

static inline void set_hard_smp_processor_id(int cpu, int phys)
{
}
#endif /* !CONFIG_SMP */
#endif /* !CONFIG_PPC64 */

extern int smt_enabled_at_boot;

Expand Down

0 comments on commit d616653

Please sign in to comment.