Skip to content

Commit 8b9686f

Browse files
committed
Merge branches 'x86-fixes-for-linus', 'sched-fixes-for-linus', 'timers-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
6 parents df9b29d + f994d99 + 49c022e + 09552b2 + 4f5058c + f64fac8 commit 8b9686f

File tree

11 files changed

+151
-89
lines changed

11 files changed

+151
-89
lines changed

arch/x86/include/asm/i387.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static inline void fpu_save_init(struct fpu *fpu)
237237
} else if (use_fxsr()) {
238238
fpu_fxsave(fpu);
239239
} else {
240-
asm volatile("fsave %[fx]; fwait"
240+
asm volatile("fnsave %[fx]; fwait"
241241
: [fx] "=m" (fpu->state->fsave));
242242
return;
243243
}

arch/x86/kernel/setup.c

+5
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,11 @@ void __init setup_arch(char **cmdline_p)
976976
paging_init();
977977
x86_init.paging.pagetable_setup_done(swapper_pg_dir);
978978

979+
if (boot_cpu_data.cpuid_level >= 0) {
980+
/* A CPU has %cr4 if and only if it has CPUID */
981+
mmu_cr4_features = read_cr4();
982+
}
983+
979984
#ifdef CONFIG_X86_32
980985
/* sync back kernel address range */
981986
clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,

arch/x86/mm/srat_32.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,12 @@ int __init get_memcfg_from_srat(void)
211211
{
212212
int i, j, nid;
213213

214-
215214
if (srat_disabled())
216215
goto out_fail;
217216

217+
if (acpi_numa_init() < 0)
218+
goto out_fail;
219+
218220
if (num_memory_chunks == 0) {
219221
printk(KERN_DEBUG
220222
"could not find any ACPI SRAT memory areas.\n");

arch/x86/platform/mrst/vrtc.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ int vrtc_set_mmss(unsigned long nowtime)
100100

101101
void __init mrst_rtc_init(void)
102102
{
103-
unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr;
103+
unsigned long vrtc_paddr;
104104

105105
sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc);
106+
107+
vrtc_paddr = sfi_mrtc_array[0].phys_addr;
106108
if (!sfi_mrtc_num || !vrtc_paddr)
107109
return;
108110

arch/x86/platform/visws/visws_quirks.c

+6-14
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,7 @@ static unsigned int startup_piix4_master_irq(struct irq_data *data)
471471
{
472472
legacy_pic->init(0);
473473
enable_cobalt_irq(data);
474-
}
475-
476-
static void end_piix4_master_irq(struct irq_data *data)
477-
{
478-
unsigned long flags;
479-
480-
spin_lock_irqsave(&cobalt_lock, flags);
481-
enable_cobalt_irq(data);
482-
spin_unlock_irqrestore(&cobalt_lock, flags);
474+
return 0;
483475
}
484476

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

493485
static struct irq_chip piix4_virtual_irq_type = {
494486
.name = "PIIX4-virtual",
495-
.mask = pii4_mask,
487+
.irq_mask = pii4_mask,
496488
};
497489

498490
/*
@@ -580,9 +572,9 @@ static struct irqaction cascade_action = {
580572

581573
static inline void set_piix4_virtual_irq_type(void)
582574
{
583-
piix4_virtual_irq_type.enable = i8259A_chip.unmask;
584-
piix4_virtual_irq_type.disable = i8259A_chip.mask;
585-
piix4_virtual_irq_type.unmask = i8259A_chip.unmask;
575+
piix4_virtual_irq_type.irq_enable = i8259A_chip.irq_unmask;
576+
piix4_virtual_irq_type.irq_disable = i8259A_chip.irq_mask;
577+
piix4_virtual_irq_type.irq_unmask = i8259A_chip.irq_unmask;
586578
}
587579

588580
static void __init visws_pre_intr_init(void)
@@ -599,7 +591,7 @@ static void __init visws_pre_intr_init(void)
599591
else if (i == CO_IRQ_IDE0)
600592
chip = &cobalt_irq_type;
601593
else if (i == CO_IRQ_IDE1)
602-
>chip = &cobalt_irq_type;
594+
chip = &cobalt_irq_type;
603595
else if (i == CO_IRQ_8259)
604596
chip = &piix4_master_irq_type;
605597
else if (i < CO_IRQ_APIC0)

drivers/rtc/rtc-mrst.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
342342

343343
mrst_rtc.irq = rtc_irq;
344344
mrst_rtc.iomem = iomem;
345+
mrst_rtc.dev = dev;
346+
dev_set_drvdata(dev, &mrst_rtc);
345347

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

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

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

378378
cleanup1:
379-
mrst_rtc.dev = NULL;
380379
rtc_device_unregister(mrst_rtc.rtc);
381380
cleanup0:
381+
dev_set_drvdata(dev, NULL);
382+
mrst_rtc.dev = NULL;
382383
release_region(iomem->start, iomem->end + 1 - iomem->start);
383384
dev_err(dev, "rtc-mrst: unable to initialise\n");
384385
return retval;

kernel/irq/manage.c

+1
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
10511051
register_irq_proc(irq, desc);
10521052
new->dir = NULL;
10531053
register_handler_proc(irq, new);
1054+
free_cpumask_var(mask);
10541055

10551056
return 0;
10561057

kernel/sched.c

+3
Original file line numberDiff line numberDiff line change
@@ -6331,6 +6331,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
63316331
break;
63326332
#endif
63336333
}
6334+
6335+
update_max_interval();
6336+
63346337
return NOTIFY_OK;
63356338
}
63366339

kernel/sched_fair.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -3820,6 +3820,17 @@ void select_nohz_load_balancer(int stop_tick)
38203820

38213821
static DEFINE_SPINLOCK(balancing);
38223822

3823+
static unsigned long __read_mostly max_load_balance_interval = HZ/10;
3824+
3825+
/*
3826+
* Scale the max load_balance interval with the number of CPUs in the system.
3827+
* This trades load-balance latency on larger machines for less cross talk.
3828+
*/
3829+
static void update_max_interval(void)
3830+
{
3831+
max_load_balance_interval = HZ*num_online_cpus()/10;
3832+
}
3833+
38233834
/*
38243835
* It checks each scheduling domain to see if it is due to be balanced,
38253836
* and initiates a balancing operation if so.
@@ -3849,10 +3860,7 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle)
38493860

38503861
/* scale ms to jiffies */
38513862
interval = msecs_to_jiffies(interval);
3852-
if (unlikely(!interval))
3853-
interval = 1;
3854-
if (interval > HZ*num_online_cpus()/10)
3855-
interval = HZ*num_online_cpus()/10;
3863+
interval = clamp(interval, 1UL, max_load_balance_interval);
38563864

38573865
need_serialize = sd->flags & SD_SERIALIZE;
38583866

tools/perf/util/probe-event.c

+8-11
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
234234

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

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

390389
ret = find_line_range(fd, lr);
391-
close(fd);
392390
if (ret == 0) {
393391
pr_warning("Specified source line is not found.\n");
394392
return -ENOENT;
@@ -512,19 +510,18 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
512510
if (ret < 0)
513511
return ret;
514512

515-
fd = open_vmlinux(module);
516-
if (fd < 0) {
517-
pr_warning("Failed to open debug information file.\n");
518-
return fd;
519-
}
520-
521513
setup_pager();
522514

523-
for (i = 0; i < npevs && ret >= 0; i++)
515+
for (i = 0; i < npevs && ret >= 0; i++) {
516+
fd = open_vmlinux(module);
517+
if (fd < 0) {
518+
pr_warning("Failed to open debug information file.\n");
519+
ret = fd;
520+
break;
521+
}
524522
ret = show_available_vars_at(fd, &pevs[i], max_vls, _filter,
525523
externs);
526-
527-
close(fd);
524+
}
528525
return ret;
529526
}
530527

0 commit comments

Comments
 (0)