Skip to content

Commit

Permalink
Merge branches 'x86-fixes-for-linus', 'sched-fixes-for-linus', 'timer…
Browse files Browse the repository at this point in the history
…s-fixes-for-linus', 'irq-fixes-for-linus' and 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86-32, fpu: Fix FPU exception handling on non-SSE systems
  x86, hibernate: Initialize mmu_cr4_features during boot
  x86-32, NUMA: Fix ACPI NUMA init broken by recent x86-64 change
  x86: visws: Fixup irq overhaul fallout

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Clean up rebalance_domains() load-balance interval calculation

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/mrst/vrtc: Fix boot crash in mrst_rtc_init()
  rtc, x86/mrst/vrtc: Fix boot crash in rtc_read_alarm()

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Fix cpumask leak in __setup_irq()

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf probe: Fix listing incorrect line number with inline function
  perf probe: Fix to find recursively inlined function
  perf probe: Fix multiple --vars options behavior
  perf probe: Fix to remove redundant close
  perf probe: Fix to ensure function declared file
  • Loading branch information
torvalds committed Apr 7, 2011
6 parents df9b29d + f994d99 + 49c022e + 09552b2 + 4f5058c + f64fac8 commit 8b9686f
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 89 deletions.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static inline void fpu_save_init(struct fpu *fpu)
} else if (use_fxsr()) {
fpu_fxsave(fpu);
} else {
asm volatile("fsave %[fx]; fwait"
asm volatile("fnsave %[fx]; fwait"
: [fx] "=m" (fpu->state->fsave));
return;
}
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,11 @@ void __init setup_arch(char **cmdline_p)
paging_init();
x86_init.paging.pagetable_setup_done(swapper_pg_dir);

if (boot_cpu_data.cpuid_level >= 0) {
/* A CPU has %cr4 if and only if it has CPUID */
mmu_cr4_features = read_cr4();
}

#ifdef CONFIG_X86_32
/* sync back kernel address range */
clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/mm/srat_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,12 @@ int __init get_memcfg_from_srat(void)
{
int i, j, nid;


if (srat_disabled())
goto out_fail;

if (acpi_numa_init() < 0)
goto out_fail;

if (num_memory_chunks == 0) {
printk(KERN_DEBUG
"could not find any ACPI SRAT memory areas.\n");
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/platform/mrst/vrtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ int vrtc_set_mmss(unsigned long nowtime)

void __init mrst_rtc_init(void)
{
unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr;
unsigned long vrtc_paddr;

sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc);

vrtc_paddr = sfi_mrtc_array[0].phys_addr;
if (!sfi_mrtc_num || !vrtc_paddr)
return;

Expand Down
20 changes: 6 additions & 14 deletions arch/x86/platform/visws/visws_quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,15 +471,7 @@ static unsigned int startup_piix4_master_irq(struct irq_data *data)
{
legacy_pic->init(0);
enable_cobalt_irq(data);
}

static void end_piix4_master_irq(struct irq_data *data)
{
unsigned long flags;

spin_lock_irqsave(&cobalt_lock, flags);
enable_cobalt_irq(data);
spin_unlock_irqrestore(&cobalt_lock, flags);
return 0;
}

static struct irq_chip piix4_master_irq_type = {
Expand All @@ -492,7 +484,7 @@ static void pii4_mask(struct irq_data *data) { }

static struct irq_chip piix4_virtual_irq_type = {
.name = "PIIX4-virtual",
.mask = pii4_mask,
.irq_mask = pii4_mask,
};

/*
Expand Down Expand Up @@ -580,9 +572,9 @@ static struct irqaction cascade_action = {

static inline void set_piix4_virtual_irq_type(void)
{
piix4_virtual_irq_type.enable = i8259A_chip.unmask;
piix4_virtual_irq_type.disable = i8259A_chip.mask;
piix4_virtual_irq_type.unmask = i8259A_chip.unmask;
piix4_virtual_irq_type.irq_enable = i8259A_chip.irq_unmask;
piix4_virtual_irq_type.irq_disable = i8259A_chip.irq_mask;
piix4_virtual_irq_type.irq_unmask = i8259A_chip.irq_unmask;
}

static void __init visws_pre_intr_init(void)
Expand All @@ -599,7 +591,7 @@ static void __init visws_pre_intr_init(void)
else if (i == CO_IRQ_IDE0)
chip = &cobalt_irq_type;
else if (i == CO_IRQ_IDE1)
>chip = &cobalt_irq_type;
chip = &cobalt_irq_type;
else if (i == CO_IRQ_8259)
chip = &piix4_master_irq_type;
else if (i < CO_IRQ_APIC0)
Expand Down
7 changes: 4 additions & 3 deletions drivers/rtc/rtc-mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)

mrst_rtc.irq = rtc_irq;
mrst_rtc.iomem = iomem;
mrst_rtc.dev = dev;
dev_set_drvdata(dev, &mrst_rtc);

mrst_rtc.rtc = rtc_device_register(driver_name, dev,
&mrst_rtc_ops, THIS_MODULE);
Expand All @@ -350,8 +352,6 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
goto cleanup0;
}

mrst_rtc.dev = dev;
dev_set_drvdata(dev, &mrst_rtc);
rename_region(iomem, dev_name(&mrst_rtc.rtc->dev));

spin_lock_irq(&rtc_lock);
Expand All @@ -376,9 +376,10 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
return 0;

cleanup1:
mrst_rtc.dev = NULL;
rtc_device_unregister(mrst_rtc.rtc);
cleanup0:
dev_set_drvdata(dev, NULL);
mrst_rtc.dev = NULL;
release_region(iomem->start, iomem->end + 1 - iomem->start);
dev_err(dev, "rtc-mrst: unable to initialise\n");
return retval;
Expand Down
1 change: 1 addition & 0 deletions kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
register_irq_proc(irq, desc);
new->dir = NULL;
register_handler_proc(irq, new);
free_cpumask_var(mask);

return 0;

Expand Down
3 changes: 3 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6331,6 +6331,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
break;
#endif
}

update_max_interval();

return NOTIFY_OK;
}

Expand Down
16 changes: 12 additions & 4 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -3820,6 +3820,17 @@ void select_nohz_load_balancer(int stop_tick)

static DEFINE_SPINLOCK(balancing);

static unsigned long __read_mostly max_load_balance_interval = HZ/10;

/*
* Scale the max load_balance interval with the number of CPUs in the system.
* This trades load-balance latency on larger machines for less cross talk.
*/
static void update_max_interval(void)
{
max_load_balance_interval = HZ*num_online_cpus()/10;
}

/*
* It checks each scheduling domain to see if it is due to be balanced,
* and initiates a balancing operation if so.
Expand Down Expand Up @@ -3849,10 +3860,7 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle)

/* scale ms to jiffies */
interval = msecs_to_jiffies(interval);
if (unlikely(!interval))
interval = 1;
if (interval > HZ*num_online_cpus()/10)
interval = HZ*num_online_cpus()/10;
interval = clamp(interval, 1UL, max_load_balance_interval);

need_serialize = sd->flags & SD_SERIALIZE;

Expand Down
19 changes: 8 additions & 11 deletions tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,

/* Searching trace events corresponding to probe event */
ntevs = find_probe_trace_events(fd, pev, tevs, max_tevs);
close(fd);

if (ntevs > 0) { /* Succeeded to find trace events */
pr_debug("find %d probe_trace_events.\n", ntevs);
Expand Down Expand Up @@ -388,7 +387,6 @@ int show_line_range(struct line_range *lr, const char *module)
}

ret = find_line_range(fd, lr);
close(fd);
if (ret == 0) {
pr_warning("Specified source line is not found.\n");
return -ENOENT;
Expand Down Expand Up @@ -512,19 +510,18 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
if (ret < 0)
return ret;

fd = open_vmlinux(module);
if (fd < 0) {
pr_warning("Failed to open debug information file.\n");
return fd;
}

setup_pager();

for (i = 0; i < npevs && ret >= 0; i++)
for (i = 0; i < npevs && ret >= 0; i++) {
fd = open_vmlinux(module);
if (fd < 0) {
pr_warning("Failed to open debug information file.\n");
ret = fd;
break;
}
ret = show_available_vars_at(fd, &pevs[i], max_vls, _filter,
externs);

close(fd);
}
return ret;
}

Expand Down
Loading

0 comments on commit 8b9686f

Please sign in to comment.