mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-24 20:50:30 +00:00
2f4dfe206a
With the advent of kdump, the assumption that the boot CPU when booting an UP kernel is always the CPU with a particular hardware ID (often 0) (usually referred to as BSP on some architectures) is not valid anymore. The reason being that the dump capture kernel boots on the crashed CPU (the CPU that invoked crash_kexec), which may be or may not be that particular CPU. Move definition of hard_smp_processor_id for the UP case to architecture-specific code ("asm/smp.h") where it belongs, so that each architecture can provide its own implementation. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Cc: "Luck, Tony" <tony.luck@intel.com> Acked-by: Andi Kleen <ak@suse.de> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
34 lines
567 B
C
34 lines
567 B
C
#ifndef __UM_SMP_H
|
|
#define __UM_SMP_H
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
#include "linux/bitops.h"
|
|
#include "asm/current.h"
|
|
#include "linux/cpumask.h"
|
|
|
|
#define raw_smp_processor_id() (current_thread->cpu)
|
|
|
|
#define cpu_logical_map(n) (n)
|
|
#define cpu_number_map(n) (n)
|
|
#define PROC_CHANGE_PENALTY 15 /* Pick a number, any number */
|
|
extern int hard_smp_processor_id(void);
|
|
#define NO_PROC_ID -1
|
|
|
|
extern int ncpus;
|
|
|
|
|
|
extern inline void smp_cpus_done(unsigned int maxcpus)
|
|
{
|
|
}
|
|
|
|
extern struct task_struct *idle_threads[NR_CPUS];
|
|
|
|
#else
|
|
|
|
#define hard_smp_processor_id() 0
|
|
|
|
#endif
|
|
|
|
#endif
|