Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branches 'core-fixes-for-linus', 'perf-fixes-for-linus', 'sched-fixes-for-linus', 'timer-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf_event: Fix cgrp event scheduling bug in perf_enable_on_exec()
perf: Fix a build error with some GCC versions

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: Fix erroneous all_pinned logic
sched: Fix sched-domain avg_load calculation

* 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
RTC: rtc-mrst: follow on to the change of rtc_device_register()
RTC: add missing "return 0" in new alarm func for rtc-bfin.c
RTC: Fix s3c compile error due to missing s3c_rtc_setpie
RTC: Fix early irqs caused by calling rtc_set_alarm too early

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, amd: Disable GartTlbWlkErr when BIOS forgets it
x86, NUMA: Fix fakenuma boot failure
x86/mrst: Fix boot crash caused by incorrect pin to irq mapping
x86/ce4100: Add reg property to bridges

+104 -18
+4
arch/x86/include/asm/msr-index.h
··· 96 96 #define MSR_IA32_MC0_ADDR 0x00000402 97 97 #define MSR_IA32_MC0_MISC 0x00000403 98 98 99 + #define MSR_AMD64_MC0_MASK 0xc0010044 100 + 99 101 #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) 100 102 #define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) 101 103 #define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) 102 104 #define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) 105 + 106 + #define MSR_AMD64_MCx_MASK(x) (MSR_AMD64_MC0_MASK + (x)) 103 107 104 108 /* These are consecutive and not in the normal 4er MCE bank block */ 105 109 #define MSR_IA32_MC0_CTL2 0x00000280
+19
arch/x86/kernel/cpu/amd.c
··· 615 615 /* As a rule processors have APIC timer running in deep C states */ 616 616 if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400)) 617 617 set_cpu_cap(c, X86_FEATURE_ARAT); 618 + 619 + /* 620 + * Disable GART TLB Walk Errors on Fam10h. We do this here 621 + * because this is always needed when GART is enabled, even in a 622 + * kernel which has no MCE support built in. 623 + */ 624 + if (c->x86 == 0x10) { 625 + /* 626 + * BIOS should disable GartTlbWlk Errors themself. If 627 + * it doesn't do it here as suggested by the BKDG. 628 + * 629 + * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012 630 + */ 631 + u64 mask; 632 + 633 + rdmsrl(MSR_AMD64_MCx_MASK(4), mask); 634 + mask |= (1 << 10); 635 + wrmsrl(MSR_AMD64_MCx_MASK(4), mask); 636 + } 618 637 } 619 638 620 639 #ifdef CONFIG_X86_32
+23
arch/x86/kernel/smpboot.c
··· 312 312 identify_secondary_cpu(c); 313 313 } 314 314 315 + static void __cpuinit check_cpu_siblings_on_same_node(int cpu1, int cpu2) 316 + { 317 + int node1 = early_cpu_to_node(cpu1); 318 + int node2 = early_cpu_to_node(cpu2); 319 + 320 + /* 321 + * Our CPU scheduler assumes all logical cpus in the same physical cpu 322 + * share the same node. But, buggy ACPI or NUMA emulation might assign 323 + * them to different node. Fix it. 324 + */ 325 + if (node1 != node2) { 326 + pr_warning("CPU %d in node %d and CPU %d in node %d are in the same physical CPU. forcing same node %d\n", 327 + cpu1, node1, cpu2, node2, node2); 328 + 329 + numa_remove_cpu(cpu1); 330 + numa_set_node(cpu1, node2); 331 + numa_add_cpu(cpu1); 332 + } 333 + } 334 + 315 335 static void __cpuinit link_thread_siblings(int cpu1, int cpu2) 316 336 { 317 337 cpumask_set_cpu(cpu1, cpu_sibling_mask(cpu2)); ··· 340 320 cpumask_set_cpu(cpu2, cpu_core_mask(cpu1)); 341 321 cpumask_set_cpu(cpu1, cpu_llc_shared_mask(cpu2)); 342 322 cpumask_set_cpu(cpu2, cpu_llc_shared_mask(cpu1)); 323 + check_cpu_siblings_on_same_node(cpu1, cpu2); 343 324 } 344 325 345 326 ··· 382 361 per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { 383 362 cpumask_set_cpu(i, cpu_llc_shared_mask(cpu)); 384 363 cpumask_set_cpu(cpu, cpu_llc_shared_mask(i)); 364 + check_cpu_siblings_on_same_node(cpu, i); 385 365 } 386 366 if (c->phys_proc_id == cpu_data(i).phys_proc_id) { 387 367 cpumask_set_cpu(i, cpu_core_mask(cpu)); 388 368 cpumask_set_cpu(cpu, cpu_core_mask(i)); 369 + check_cpu_siblings_on_same_node(cpu, i); 389 370 /* 390 371 * Does this new cpu bringup a new core? 391 372 */
+2
arch/x86/platform/ce4100/falconfalls.dts
··· 74 74 compatible = "intel,ce4100-pci", "pci"; 75 75 device_type = "pci"; 76 76 bus-range = <1 1>; 77 + reg = <0x0800 0x0 0x0 0x0 0x0>; 77 78 ranges = <0x2000000 0 0xdffe0000 0x2000000 0 0xdffe0000 0 0x1000>; 78 79 79 80 interrupt-parent = <&ioapic2>; ··· 413 412 #address-cells = <2>; 414 413 #size-cells = <1>; 415 414 compatible = "isa"; 415 + reg = <0xf800 0x0 0x0 0x0 0x0>; 416 416 ranges = <1 0 0 0 0 0x100>; 417 417 418 418 rtc@70 {
+5 -5
arch/x86/platform/mrst/mrst.c
··· 97 97 pentry->freq_hz, pentry->irq); 98 98 if (!pentry->irq) 99 99 continue; 100 - mp_irq.type = MP_IOAPIC; 100 + mp_irq.type = MP_INTSRC; 101 101 mp_irq.irqtype = mp_INT; 102 102 /* triggering mode edge bit 2-3, active high polarity bit 0-1 */ 103 103 mp_irq.irqflag = 5; 104 - mp_irq.srcbus = 0; 104 + mp_irq.srcbus = MP_BUS_ISA; 105 105 mp_irq.srcbusirq = pentry->irq; /* IRQ */ 106 106 mp_irq.dstapic = MP_APIC_ALL; 107 107 mp_irq.dstirq = pentry->irq; ··· 168 168 for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) { 169 169 pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n", 170 170 totallen, (u32)pentry->phys_addr, pentry->irq); 171 - mp_irq.type = MP_IOAPIC; 171 + mp_irq.type = MP_INTSRC; 172 172 mp_irq.irqtype = mp_INT; 173 173 mp_irq.irqflag = 0xf; /* level trigger and active low */ 174 - mp_irq.srcbus = 0; 174 + mp_irq.srcbus = MP_BUS_ISA; 175 175 mp_irq.srcbusirq = pentry->irq; /* IRQ */ 176 176 mp_irq.dstapic = MP_APIC_ALL; 177 177 mp_irq.dstirq = pentry->irq; ··· 282 282 /* Avoid searching for BIOS MP tables */ 283 283 x86_init.mpparse.find_smp_config = x86_init_noop; 284 284 x86_init.mpparse.get_smp_config = x86_init_uint_noop; 285 - 285 + set_bit(MP_BUS_ISA, mp_bus_not_pci); 286 286 } 287 287 288 288 /*
+1 -1
drivers/rtc/class.c
··· 171 171 err = __rtc_read_alarm(rtc, &alrm); 172 172 173 173 if (!err && !rtc_valid_tm(&alrm.time)) 174 - rtc_set_alarm(rtc, &alrm); 174 + rtc_initialize_alarm(rtc, &alrm); 175 175 176 176 strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); 177 177 dev_set_name(&rtc->dev, "rtc%d", id);
+26
drivers/rtc/interface.c
··· 375 375 } 376 376 EXPORT_SYMBOL_GPL(rtc_set_alarm); 377 377 378 + /* Called once per device from rtc_device_register */ 379 + int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) 380 + { 381 + int err; 382 + 383 + err = rtc_valid_tm(&alarm->time); 384 + if (err != 0) 385 + return err; 386 + 387 + err = mutex_lock_interruptible(&rtc->ops_lock); 388 + if (err) 389 + return err; 390 + 391 + rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); 392 + rtc->aie_timer.period = ktime_set(0, 0); 393 + if (alarm->enabled) { 394 + rtc->aie_timer.enabled = 1; 395 + timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node); 396 + } 397 + mutex_unlock(&rtc->ops_lock); 398 + return err; 399 + } 400 + EXPORT_SYMBOL_GPL(rtc_initialize_alarm); 401 + 402 + 403 + 378 404 int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled) 379 405 { 380 406 int err = mutex_lock_interruptible(&rtc->ops_lock);
+2
drivers/rtc/rtc-bfin.c
··· 250 250 bfin_rtc_int_set_alarm(rtc); 251 251 else 252 252 bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); 253 + 254 + return 0; 253 255 } 254 256 255 257 static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm)
-2
drivers/rtc/rtc-s3c.c
··· 336 336 337 337 /* do not clear AIE here, it may be needed for wake */ 338 338 339 - s3c_rtc_setpie(dev, 0); 340 339 free_irq(s3c_rtc_alarmno, rtc_dev); 341 340 free_irq(s3c_rtc_tickno, rtc_dev); 342 341 } ··· 407 408 platform_set_drvdata(dev, NULL); 408 409 rtc_device_unregister(rtc); 409 410 410 - s3c_rtc_setpie(&dev->dev, 0); 411 411 s3c_rtc_setaie(&dev->dev, 0); 412 412 413 413 clk_disable(rtc_clk);
+2
include/linux/rtc.h
··· 228 228 struct rtc_wkalrm *alrm); 229 229 extern int rtc_set_alarm(struct rtc_device *rtc, 230 230 struct rtc_wkalrm *alrm); 231 + extern int rtc_initialize_alarm(struct rtc_device *rtc, 232 + struct rtc_wkalrm *alrm); 231 233 extern void rtc_update_irq(struct rtc_device *rtc, 232 234 unsigned long num, unsigned long events); 233 235
+1 -1
kernel/futex.c
··· 1886 1886 restart->futex.val = val; 1887 1887 restart->futex.time = abs_time->tv64; 1888 1888 restart->futex.bitset = bitset; 1889 - restart->futex.flags = flags; 1889 + restart->futex.flags = flags | FLAGS_HAS_TIMEOUT; 1890 1890 1891 1891 ret = -ERESTART_RESTARTBLOCK; 1892 1892
+12
kernel/perf_event.c
··· 364 364 } 365 365 366 366 if (mode & PERF_CGROUP_SWIN) { 367 + WARN_ON_ONCE(cpuctx->cgrp); 367 368 /* set cgrp before ctxsw in to 368 369 * allow event_filter_match() to not 369 370 * have to pass task around ··· 2424 2423 if (!ctx || !ctx->nr_events) 2425 2424 goto out; 2426 2425 2426 + /* 2427 + * We must ctxsw out cgroup events to avoid conflict 2428 + * when invoking perf_task_event_sched_in() later on 2429 + * in this function. Otherwise we end up trying to 2430 + * ctxswin cgroup events which are already scheduled 2431 + * in. 2432 + */ 2433 + perf_cgroup_sched_out(current); 2427 2434 task_ctx_sched_out(ctx, EVENT_ALL); 2428 2435 2429 2436 raw_spin_lock(&ctx->lock); ··· 2456 2447 2457 2448 raw_spin_unlock(&ctx->lock); 2458 2449 2450 + /* 2451 + * Also calls ctxswin for cgroup events, if any: 2452 + */ 2459 2453 perf_event_context_sched_in(ctx, ctx->task); 2460 2454 out: 2461 2455 local_irq_restore(flags);
+6 -8
kernel/sched_fair.c
··· 2104 2104 enum cpu_idle_type idle, int *all_pinned, 2105 2105 int *this_best_prio, struct cfs_rq *busiest_cfs_rq) 2106 2106 { 2107 - int loops = 0, pulled = 0, pinned = 0; 2107 + int loops = 0, pulled = 0; 2108 2108 long rem_load_move = max_load_move; 2109 2109 struct task_struct *p, *n; 2110 2110 2111 2111 if (max_load_move == 0) 2112 2112 goto out; 2113 2113 2114 - pinned = 1; 2115 - 2116 2114 list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) { 2117 2115 if (loops++ > sysctl_sched_nr_migrate) 2118 2116 break; 2119 2117 2120 2118 if ((p->se.load.weight >> 1) > rem_load_move || 2121 - !can_migrate_task(p, busiest, this_cpu, sd, idle, &pinned)) 2119 + !can_migrate_task(p, busiest, this_cpu, sd, idle, 2120 + all_pinned)) 2122 2121 continue; 2123 2122 2124 2123 pull_task(busiest, p, this_rq, this_cpu); ··· 2151 2152 * inside pull_task(). 2152 2153 */ 2153 2154 schedstat_add(sd, lb_gained[idle], pulled); 2154 - 2155 - if (all_pinned) 2156 - *all_pinned = pinned; 2157 2155 2158 2156 return max_load_move - rem_load_move; 2159 2157 } ··· 3123 3127 if (!sds.busiest || sds.busiest_nr_running == 0) 3124 3128 goto out_balanced; 3125 3129 3130 + sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr; 3131 + 3126 3132 /* 3127 3133 * If the busiest group is imbalanced the below checks don't 3128 3134 * work because they assumes all things are equal, which typically ··· 3149 3151 * Don't pull any tasks if this group is already above the domain 3150 3152 * average load. 3151 3153 */ 3152 - sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr; 3153 3154 if (sds.this_load >= sds.avg_load) 3154 3155 goto out_balanced; 3155 3156 ··· 3337 3340 * still unbalanced. ld_moved simply stays zero, so it is 3338 3341 * correctly treated as an imbalance. 3339 3342 */ 3343 + all_pinned = 1; 3340 3344 local_irq_save(flags); 3341 3345 double_rq_lock(this_rq, busiest); 3342 3346 ld_moved = move_tasks(this_rq, this_cpu, busiest,
+1 -1
tools/perf/util/cgroup.c
··· 13 13 { 14 14 FILE *fp; 15 15 char mountpoint[MAX_PATH+1], tokens[MAX_PATH+1], type[MAX_PATH+1]; 16 - char *token, *saved_ptr; 16 + char *token, *saved_ptr = NULL; 17 17 int found = 0; 18 18 19 19 fp = fopen("/proc/mounts", "r");