1. 06 Dec, 2011 7 commits
    • Uwe Kleine-König's avatar
      ARM: 7187/1: fix unwinding for XIP kernels · de66a979
      Uwe Kleine-König authored
      The linker places the unwind tables in readonly sections. So when using
      an XIP kernel these are located in ROM and cannot be modified.
      For that reason the current approach to convert the relative offsets in
      the unwind index to absolute addresses early in the boot process doesn't
      work with XIP.
      
      The offsets in the unwind index section are signed 31 bit numbers and
      the structs are sorted by this offset. So it first has offsets between
      0x40000000 and 0x7fffffff (i.e. the negative offsets) and then offsets
      between 0x00000000 and 0x3fffffff. When seperating these two blocks the
      numbers are sorted even when interpreting the offsets as unsigned longs.
      
      So determine the first non-negative entry once and track that using the
      new origin pointer. The actual bisection can then use a plain unsigned
      long comparison. The only thing that makes the new bisection more
      complicated is that the offsets are relative to their position in the
      index section, so the key to search needs to be adapted accordingly in
      each step.
      
      Moreover several consts are added to catch future writes and rename the
      member "addr" of struct unwind_idx to "addr_offset" to better match the
      new semantic. (This has the additional benefit of breaking eventual
      users at compile time to make them aware of the change.)
      
      In my tests the new algorithm was a tad faster than the original and has
      the additional upside of not needing the initial conversion and so saves
      some boot time and it's possible to unwind even earlier.
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarNicolas Pitre <nico@fluxnic.net>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      de66a979
    • Nicolas Pitre's avatar
      ARM: 7186/1: fix Kconfig issue with PHYS_OFFSET and !MMU · 974c0724
      Nicolas Pitre authored
      Commit 1b9f95f8 (ARM: prepare for removal of a bunch of <mach/memory.h>
      files) introduced CONFIG_PHYS_OFFSET but the Kconfig hex prompt did not
      provide a default value.
      
      This has the undesired side effect of breaking a reportedly used
      trick for updating defconfigs on the fly for routine buildtesting
      across all arch and all platforms, i.e.
      
      	cp /path/to/somedefconfig .config ; yes "" | make oldconfig
      
      because the config system will endlessly loop until a valid address is
      provided.
      
      However we can't just pick a random default value since it is likely to
      be wrong for the majority of the boards as the right answer for this
      option is quite varied.  So the fact that the config system insists on
      having a proper value be entered is actually a good thing.
      
      It turns out that only at91x40_defconfig has this problem because it has
      CONFIG_MMU=n. However, in the !MMU case, there is already a CONFIG_DRAM_BASE
      value that can be used here.  So let's use that as a default in that case
      and suppress the redundant CONFIG_PHYS_OFFSET prompt.
      
      Eventually the DRAM_BASE config option could simply be replaced by
      PHYS_OFFSET directly, but that's a larger change better suited for later.
      Reported-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      974c0724
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 45e713ef
      Linus Torvalds authored
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        intr_remapping: Fix section mismatch in ir_dev_scope_init()
        intel-iommu: Fix section mismatch in dmar_parse_rmrr_atsr_dev()
        x86, amd: Fix up numa_node information for AMD CPU family 15h model 0-0fh northbridge functions
        x86, AMD: Correct align_va_addr documentation
        x86/rtc, mrst: Don't register a platform RTC device for for Intel MID platforms
        x86/mrst: Battery fixes
        x86/paravirt: PTE updates in k(un)map_atomic need to be synchronous, regardless of lazy_mmu mode
        x86: Fix "Acer Aspire 1" reboot hang
        x86/mtrr: Resolve inconsistency with Intel processor manual
        x86: Document rdmsr_safe restrictions
        x86, microcode: Fix the failure path of microcode update driver init code
        Add TAINT_FIRMWARE_WORKAROUND on MTRR fixup
        x86/mpparse: Account for bus types other than ISA and PCI
        x86, mrst: Change the pmic_gpio device type to IPC
        mrst: Added some platform data for the SFI translations
        x86,mrst: Power control commands update
        x86/reboot: Blacklist Dell OptiPlex 990 known to require PCI reboot
        x86, UV: Fix UV2 hub part number
        x86: Add user_mode_vm check in stack_overflow_check
      45e713ef
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 232ea344
      Linus Torvalds authored
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix loss of notification with multi-event
        perf, x86: Force IBS LVT offset assignment for family 10h
        perf, x86: Disable PEBS on SandyBridge chips
        trace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter
        perf session: Fix crash with invalid CPU list
        perf python: Fix undefined symbol problem
        perf/x86: Enable raw event access to Intel offcore events
        perf: Don't use -ENOSPC for out of PMU resources
        perf: Do not set task_ctx pointer in cpuctx if there are no events in the context
        perf/x86: Fix PEBS instruction unwind
        oprofile, x86: Fix crash when unloading module (nmi timer mode)
        oprofile: Fix crash when unloading module (hr timer mode)
      232ea344
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 40c043b0
      Linus Torvalds authored
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clockevents: Set noop handler in clockevents_exchange_device()
        tick-broadcast: Stop active broadcast device when replacing it
        clocksource: Fix bug with max_deferment margin calculation
        rtc: Fix some bugs that allowed accumulating time drift in suspend/resume
        rtc: Disable the alarm in the hardware
      40c043b0
    • Linus Torvalds's avatar
      Merge branches 'core-urgent-for-linus' and 'irq-urgent-for-linus' of... · f14aa871
      Linus Torvalds authored
      Merge branches 'core-urgent-for-linus' and 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        slab, lockdep: Fix silly bug
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Fix race condition when stopping the irq thread
      f14aa871
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7125face
      Linus Torvalds authored
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched, x86: Avoid unnecessary overflow in sched_clock
        sched: Fix buglet in return_cfs_rq_runtime()
        sched: Avoid SMT siblings in select_idle_sibling() if possible
        sched: Set the command name of the idle tasks in SMP kernels
        sched, rt: Provide means of disabling cross-cpu bandwidth sharing
        sched: Document wait_for_completion_*() return values
        sched_fair: Fix a typo in the comment describing update_sd_lb_stats
        sched: Add a comment to effective_load() since it's a pain
      7125face
  2. 05 Dec, 2011 28 commits
  3. 04 Dec, 2011 1 commit
    • Linus Torvalds's avatar
      x86: Fix boot failures on older AMD CPU's · 8e8da023
      Linus Torvalds authored
      People with old AMD chips are getting hung boots, because commit
      bcb80e53 ("x86, microcode, AMD: Add microcode revision to
      /proc/cpuinfo") moved the microcode detection too early into
      "early_init_amd()".
      
      At that point we are *so* early in the booth that the exception tables
      haven't even been set up yet, so the whole
      
      	rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
      
      doesn't actually work: if the rdmsr does a GP fault (due to non-existant
      MSR register on older CPU's), we can't fix it up yet, and the boot fails.
      
      Fix it by simply moving the code to a slightly later point in the boot
      (init_amd() instead of early_init_amd()), since the kernel itself
      doesn't even really care about the microcode patchlevel at this point
      (or really ever: it's made available to user space in /proc/cpuinfo, and
      updated if you do a microcode load).
      Reported-tested-and-bisected-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Tested-by: default avatarBob Tracy <rct@gherkin.frus.com>
      Acked-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8e8da023
  4. 03 Dec, 2011 1 commit
    • Konrad Rzeszutek Wilk's avatar
      xen/pm_idle: Make pm_idle be default_idle under Xen. · e5fd47bf
      Konrad Rzeszutek Wilk authored
      The idea behind commit d91ee586 ("cpuidle: replace xen access to x86
      pm_idle and default_idle") was to have one call - disable_cpuidle()
      which would make pm_idle not be molested by other code.  It disallows
      cpuidle_idle_call to be set to pm_idle (which is excellent).
      
      But in the select_idle_routine() and idle_setup(), the pm_idle can still
      be set to either: amd_e400_idle, mwait_idle or default_idle.  This
      depends on some CPU flags (MWAIT) and in AMD case on the type of CPU.
      
      In case of mwait_idle we can hit some instances where the hypervisor
      (Amazon EC2 specifically) sets the MWAIT and we get:
      
        Brought up 2 CPUs
        invalid opcode: 0000 [#1] SMP
      
        Pid: 0, comm: swapper Not tainted 3.1.0-0.rc6.git0.3.fc16.x86_64 #1
        RIP: e030:[<ffffffff81015d1d>]  [<ffffffff81015d1d>] mwait_idle+0x6f/0xb4
        ...
        Call Trace:
         [<ffffffff8100e2ed>] cpu_idle+0xae/0xe8
         [<ffffffff8149ee78>] cpu_bringup_and_idle+0xe/0x10
        RIP  [<ffffffff81015d1d>] mwait_idle+0x6f/0xb4
         RSP <ffff8801d28ddf10>
      
      In the case of amd_e400_idle we don't get so spectacular crashes, but we
      do end up making an MSR which is trapped in the hypervisor, and then
      follow it up with a yield hypercall.  Meaning we end up going to
      hypervisor twice instead of just once.
      
      The previous behavior before v3.0 was that pm_idle was set to
      default_idle regardless of select_idle_routine/idle_setup.
      
      We want to do that, but only for one specific case: Xen.  This patch
      does that.
      
      Fixes RH BZ #739499 and Ubuntu #881076
      Reported-by: default avatarStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e5fd47bf
  5. 02 Dec, 2011 3 commits
    • Linus Torvalds's avatar
      Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · af968e29
      Linus Torvalds authored
      * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits)
        usb: ftdi_sio: add PID for Propox ISPcable III
        Revert "xHCI: reset-on-resume quirk for NEC uPD720200"
        xHCI: fix bug in xhci_clear_command_ring()
        usb: gadget: fsl_udc: fix dequeuing a request in progress
        usb: fsl_mxc_udc.c: Remove compile-time dependency of MX35 SoC type
        usb: fsl_mxc_udc.c: Fix build issue by including missing header file
        USB: fsl_udc_core: use usb_endpoint_xfer_isoc to judge ISO XFER
        usb: udc: Fix gadget driver's speed check in various UDC drivers
        usb: gadget: fix g_serial regression
        usb: renesas_usbhs: fixup driver speed
        usb: renesas_usbhs: fixup gadget.dev.driver when udc_stop.
        usb: renesas_usbhs: fixup signal the driver that cable was disconnected
        usb: renesas_usbhs: fixup device_register timing
        usb: musb: PM: fix context save/restore in suspend/resume path
        USB: linux-cdc-acm.inf: add support for the acm_ms gadget
        EHCI : Fix a regression in the ISO scheduler
        xHCI: reset-on-resume quirk for NEC uPD720200
        USB: whci-hcd: fix endian conversion in qset_clear()
        USB: usb-storage: unusual_devs entry for Kingston DT 101 G2
        usb: option: add SIMCom SIM5218
        ...
      af968e29
    • Linus Torvalds's avatar
      Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · f9143eae
      Linus Torvalds authored
      * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Staging: comedi: fix integer overflow in do_insnlist_ioctl()
        Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"
        Staging: comedi: integer overflow in do_insnlist_ioctl()
        Staging: comedi: fix signal handling in read and write
        Staging: comedi: fix mmap_count
        staging: comedi: fix oops for USB DAQ devices.
        staging: comedi: usbduxsigma: Fixed wrong range for the analogue channel.
        staging:rts_pstor:Complete scanning_done variable
        staging: usbip: bugfix for deadlock
      f9143eae
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · ffb8fb54
      Linus Torvalds authored
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: fix attr2 vs large data fork assert
        xfs: force buffer writeback before blocking on the ilock in inode reclaim
        xfs: validate acl count
      ffb8fb54