Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106943
b: refs/heads/master
c: 56adc59
h: refs/heads/master
i:
  106941: 77b87e4
  106939: eec8dc3
  106935: 1aef721
  106927: aee26dd
  106911: d9d666b
  106879: c36e86c
v: v3
  • Loading branch information
Jesse Barnes authored and Jesse Barnes committed Jul 28, 2008
1 parent 5a62bae commit 3f8448c
Show file tree
Hide file tree
Showing 63 changed files with 301 additions and 1,134 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: a3ad7f128c637b7612ebeacb1f85fec933bb1195
refs/heads/master: 56adc59d81b01ac5924f7eba6e22adc762a1e2c6
20 changes: 10 additions & 10 deletions trunk/Documentation/kdump/kdump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ Install kexec-tools

2) Download the kexec-tools user-space package from the following URL:

http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools.tar.gz
http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-testing.tar.gz

This is a symlink to the latest version.
This is a symlink to the latest version, which at the time of writing is
20061214, the only release of kexec-tools-testing so far. As other versions
are released, the older ones will remain available at
http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/

The latest kexec-tools git tree is available at:
Note: Latest kexec-tools-testing git tree is available at

git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools.git
git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools-testing.git
or
http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools.git

More information about kexec-tools can be found at
http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/README.html
http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools-testing.git;a=summary

3) Unpack the tarball with the tar command, as follows:

tar xvpzf kexec-tools.tar.gz
tar xvpzf kexec-tools-testing.tar.gz

4) Change to the kexec-tools directory, as follows:

cd kexec-tools-VERSION
cd kexec-tools-testing-VERSION

5) Configure the package, as follows:

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ config ARCH_VERSATILE
config ARCH_AT91
bool "Atmel AT91"
select GENERIC_GPIO
select HAVE_CLK
help
This enables support for systems based on the Atmel AT91RM9200,
AT91SAM9 and AT91CAP9 processors.
Expand Down Expand Up @@ -268,6 +267,7 @@ config ARCH_EP93XX
select ARM_VIC
select GENERIC_GPIO
select HAVE_CLK
select HAVE_CLK
select ARCH_REQUIRE_GPIOLIB
help
This enables support for the Cirrus EP93xx series of CPUs.
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/acpi/cstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
struct cpuinfo_x86 *c = &cpu_data(cpu);

cpumask_t saved_mask;
cpumask_of_cpu_ptr(new_mask, cpu);
int retval;
unsigned int eax, ebx, ecx, edx;
unsigned int edx_part;
Expand All @@ -91,7 +92,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,

/* Make sure we are running on right CPU */
saved_mask = current->cpus_allowed;
retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
retval = set_cpus_allowed_ptr(current, new_mask);
if (retval)
return -1;

Expand Down
10 changes: 7 additions & 3 deletions trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,12 @@ static void drv_read(struct drv_cmd *cmd)
static void drv_write(struct drv_cmd *cmd)
{
cpumask_t saved_mask = current->cpus_allowed;
cpumask_of_cpu_ptr_declare(cpu_mask);
unsigned int i;

for_each_cpu_mask_nr(i, cmd->mask) {
set_cpus_allowed_ptr(current, &cpumask_of_cpu(i));
cpumask_of_cpu_ptr_next(cpu_mask, i);
set_cpus_allowed_ptr(current, cpu_mask);
do_drv_write(cmd);
}

Expand Down Expand Up @@ -267,11 +269,12 @@ static unsigned int get_measured_perf(unsigned int cpu)
} aperf_cur, mperf_cur;

cpumask_t saved_mask;
cpumask_of_cpu_ptr(cpu_mask, cpu);
unsigned int perf_percent;
unsigned int retval;

saved_mask = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, cpu_mask);
if (get_cpu() != cpu) {
/* We were not able to run on requested processor */
put_cpu();
Expand Down Expand Up @@ -337,6 +340,7 @@ static unsigned int get_measured_perf(unsigned int cpu)

static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
{
cpumask_of_cpu_ptr(cpu_mask, cpu);
struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu);
unsigned int freq;
unsigned int cached_freq;
Expand All @@ -349,7 +353,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
}

cached_freq = data->freq_table[data->acpi_data->state].frequency;
freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data);
freq = extract_freq(get_cur_val(cpu_mask), data);
if (freq != cached_freq) {
/*
* The dreaded BIOS frequency change behind our back.
Expand Down
15 changes: 10 additions & 5 deletions trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,12 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi
static int check_supported_cpu(unsigned int cpu)
{
cpumask_t oldmask;
cpumask_of_cpu_ptr(cpu_mask, cpu);
u32 eax, ebx, ecx, edx;
unsigned int rc = 0;

oldmask = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, cpu_mask);

if (smp_processor_id() != cpu) {
printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu);
Expand Down Expand Up @@ -1016,6 +1017,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i
static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation)
{
cpumask_t oldmask;
cpumask_of_cpu_ptr(cpu_mask, pol->cpu);
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
u32 checkfid;
u32 checkvid;
Expand All @@ -1030,7 +1032,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi

/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu));
set_cpus_allowed_ptr(current, cpu_mask);

if (smp_processor_id() != pol->cpu) {
printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
Expand Down Expand Up @@ -1105,6 +1107,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
{
struct powernow_k8_data *data;
cpumask_t oldmask;
cpumask_of_cpu_ptr_declare(newmask);
int rc;

if (!cpu_online(pol->cpu))
Expand Down Expand Up @@ -1156,7 +1159,8 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)

/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu));
cpumask_of_cpu_ptr_next(newmask, pol->cpu);
set_cpus_allowed_ptr(current, newmask);

if (smp_processor_id() != pol->cpu) {
printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
Expand All @@ -1178,7 +1182,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
set_cpus_allowed_ptr(current, &oldmask);

if (cpu_family == CPU_HW_PSTATE)
pol->cpus = cpumask_of_cpu(pol->cpu);
pol->cpus = *newmask;
else
pol->cpus = per_cpu(cpu_core_map, pol->cpu);
data->available_cores = &(pol->cpus);
Expand Down Expand Up @@ -1244,6 +1248,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
{
struct powernow_k8_data *data;
cpumask_t oldmask = current->cpus_allowed;
cpumask_of_cpu_ptr(newmask, cpu);
unsigned int khz = 0;
unsigned int first;

Expand All @@ -1253,7 +1258,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
if (!data)
return -EINVAL;

set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, newmask);
if (smp_processor_id() != cpu) {
printk(KERN_ERR PFX
"limiting to CPU %d failed in powernowk8_get\n", cpu);
Expand Down
12 changes: 8 additions & 4 deletions trunk/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,10 @@ static unsigned int get_cur_freq(unsigned int cpu)
unsigned l, h;
unsigned clock_freq;
cpumask_t saved_mask;
cpumask_of_cpu_ptr(new_mask, cpu);

saved_mask = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, new_mask);
if (smp_processor_id() != cpu)
return 0;

Expand Down Expand Up @@ -584,12 +585,15 @@ static int centrino_target (struct cpufreq_policy *policy,
* Best effort undo..
*/

if (!cpus_empty(*covered_cpus))
if (!cpus_empty(*covered_cpus)) {
cpumask_of_cpu_ptr_declare(new_mask);

for_each_cpu_mask_nr(j, *covered_cpus) {
set_cpus_allowed_ptr(current,
&cpumask_of_cpu(j));
cpumask_of_cpu_ptr_next(new_mask, j);
set_cpus_allowed_ptr(current, new_mask);
wrmsr(MSR_IA32_PERF_CTL, oldmsr, h);
}
}

tmp = freqs.new;
freqs.new = freqs.old;
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ static unsigned int _speedstep_get(const cpumask_t *cpus)

static unsigned int speedstep_get(unsigned int cpu)
{
return _speedstep_get(&cpumask_of_cpu(cpu));
cpumask_of_cpu_ptr(newmask, cpu);
return _speedstep_get(newmask);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
unsigned long j;
int retval;
cpumask_t oldmask;
cpumask_of_cpu_ptr(newmask, cpu);

if (num_cache_leaves == 0)
return -ENOENT;
Expand All @@ -526,7 +527,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
return -ENOMEM;

oldmask = current->cpus_allowed;
retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
retval = set_cpus_allowed_ptr(current, newmask);
if (retval)
goto out;

Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/x86/kernel/ldt.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)

if (reload) {
#ifdef CONFIG_SMP
cpumask_of_cpu_ptr_declare(mask);

preempt_disable();
load_LDT(pc);
if (!cpus_equal(current->mm->cpu_vm_mask,
cpumask_of_cpu(smp_processor_id())))
cpumask_of_cpu_ptr_next(mask, smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, *mask))
smp_call_function(flush_ldt, current->mm, 1);
preempt_enable();
#else
Expand Down
17 changes: 12 additions & 5 deletions trunk/arch/x86/kernel/microcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ static int do_microcode_update (void)
void *new_mc = NULL;
int cpu;
cpumask_t old;
cpumask_of_cpu_ptr_declare(newmask);

old = current->cpus_allowed;

Expand All @@ -404,7 +405,8 @@ static int do_microcode_update (void)

if (!uci->valid)
continue;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
cpumask_of_cpu_ptr_next(newmask, cpu);
set_cpus_allowed_ptr(current, newmask);
error = get_maching_microcode(new_mc, cpu);
if (error < 0)
goto out;
Expand Down Expand Up @@ -574,6 +576,7 @@ static int apply_microcode_check_cpu(int cpu)
struct cpuinfo_x86 *c = &cpu_data(cpu);
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
cpumask_t old;
cpumask_of_cpu_ptr(newmask, cpu);
unsigned int val[2];
int err = 0;

Expand All @@ -582,7 +585,7 @@ static int apply_microcode_check_cpu(int cpu)
return 0;

old = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, newmask);

/* Check if the microcode we have in memory matches the CPU */
if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 ||
Expand Down Expand Up @@ -620,11 +623,12 @@ static int apply_microcode_check_cpu(int cpu)
static void microcode_init_cpu(int cpu, int resume)
{
cpumask_t old;
cpumask_of_cpu_ptr(newmask, cpu);
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;

old = current->cpus_allowed;

set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, newmask);
mutex_lock(&microcode_mutex);
collect_cpu_info(cpu);
if (uci->valid && system_state == SYSTEM_RUNNING && !resume)
Expand Down Expand Up @@ -657,10 +661,13 @@ static ssize_t reload_store(struct sys_device *dev,
if (end == buf)
return -EINVAL;
if (val == 1) {
cpumask_t old = current->cpus_allowed;
cpumask_t old;
cpumask_of_cpu_ptr(newmask, cpu);

old = current->cpus_allowed;

get_online_cpus();
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, newmask);

mutex_lock(&microcode_mutex);
if (uci->valid)
Expand Down
11 changes: 8 additions & 3 deletions trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,20 +414,25 @@ void native_machine_shutdown(void)

/* The boot cpu is always logical cpu 0 */
int reboot_cpu_id = 0;
cpumask_of_cpu_ptr(newmask, reboot_cpu_id);

#ifdef CONFIG_X86_32
/* See if there has been given a command line override */
if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) &&
cpu_online(reboot_cpu))
cpu_online(reboot_cpu)) {
reboot_cpu_id = reboot_cpu;
cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id);
}
#endif

/* Make certain the cpu I'm about to reboot on is online */
if (!cpu_online(reboot_cpu_id))
if (!cpu_online(reboot_cpu_id)) {
reboot_cpu_id = smp_processor_id();
cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id);
}

/* Make certain I only run on the appropriate processor */
set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id));
set_cpus_allowed_ptr(current, newmask);

/* O.K Now that I'm on the appropriate processor,
* stop all of the others.
Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/x86/kernel/setup_percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ static void __init setup_per_cpu_maps(void)
#endif
}

#ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP
cpumask_t *cpumask_of_cpu_map __read_mostly;
EXPORT_SYMBOL(cpumask_of_cpu_map);

/* requires nr_cpu_ids to be initialized */
static void __init setup_cpumask_of_cpu(void)
{
int i;

/* alloc_bootmem zeroes memory */
cpumask_of_cpu_map = alloc_bootmem_low(sizeof(cpumask_t) * nr_cpu_ids);
for (i = 0; i < nr_cpu_ids; i++)
cpu_set(i, cpumask_of_cpu_map[i]);
}
#else
static inline void setup_cpumask_of_cpu(void) { }
#endif

#ifdef CONFIG_X86_32
/*
* Great future not-so-futuristic plan: make i386 and x86_64 do it
Expand Down Expand Up @@ -179,6 +197,9 @@ void __init setup_per_cpu_areas(void)

/* Setup node to cpumask map */
setup_node_to_cpumask_map();

/* Setup cpumask_of_cpu map */
setup_cpumask_of_cpu();
}

#endif
Expand Down
Loading

0 comments on commit 3f8448c

Please sign in to comment.