02 Feb, 2010

1 commit


31 Jan, 2010

2 commits


30 Jan, 2010

3 commits

  • Here are the sparc bits to remove TIF_ABI_PENDING now that
    set_personality() is called at the appropriate place in exec.

    Signed-off-by: David S. Miller
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    David Miller
     
  • Now that the previous commit made it possible to do the personality
    setting at the point of no return, we do just that for ELF binaries.
    And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
    away, and we can just make SET_PERSONALITY() just do the obvious thing
    for a 32-bit compat process.

    Everything becomes much more straightforward this way.

    Signed-off-by: H. Peter Anvin
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     
  • 'flush_old_exec()' is the point of no return when doing an execve(), and
    it is pretty badly misnamed. It doesn't just flush the old executable
    environment, it also starts up the new one.

    Which is very inconvenient for things like setting up the new
    personality, because we want the new personality to affect the starting
    of the new environment, but at the same time we do _not_ want the new
    personality to take effect if flushing the old one fails.

    As a result, the x86-64 '32-bit' personality is actually done using this
    insane "I'm going to change the ABI, but I haven't done it yet" bit
    (TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the
    personality, but just the "pending" bit, so that "flush_thread()" can do
    the actual personality magic.

    This patch in no way changes any of that insanity, but it does split the
    'flush_old_exec()' function up into a preparatory part that can fail
    (still called flush_old_exec()), and a new part that will actually set
    up the new exec environment (setup_new_exec()). All callers are changed
    to trivially comply with the new world order.

    Signed-off-by: H. Peter Anvin
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

29 Jan, 2010

5 commits


28 Jan, 2010

6 commits

  • The MIPS processor is limited to 64 external interrupt sources. Using a
    greater number without IRQ sharing requires reading platform-specific
    registers. On such platforms, reading the IntCtl register to determine
    which interrupt corresponds to a timer interrupt will not work.

    On MIPSR2 systems there is a solution - the TI bit in the Cause register,
    specifically indicates that a timer interrupt has occured. This patch uses
    that bit to detect interrupts for MIPSR2 processors, which may be expected
    to work regardless of how the timer interrupt may be routed in the hardware.

    Signed-off-by: David VomLehn (dvomlehn@cisco.com)
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/804/
    Signed-off-by: Ralf Baechle

    David VomLehn
     
  • Pre-compute addresses for the basic ASIC registers. This speeds up access
    and allows memory for unused configurations to be freed. In addition,
    uninitialized register addresses will be returned as NULL to catch bad
    usage quickly.

    Signed-off-by: David VomLehn
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/806/
    Signed-off-by: Ralf Baechle

    David VomLehn
     
  • POSIX requires $(()) arithmetic in sh only to have long
    arithmetic so on 32-bit sh binaries might do only 32-bit arithmetic but
    the arithmetic done in arch/mips/boot/compressed/Makefile needs 64-bit.

    I play with the AR7 platform, so VMLINUX_LOAD_ADDRESS is
    0xffffffff94100000, and for an example 4MiB kernel
    VMLINUZ_LOAD_ADDRESS is made out to be:
    ----
    alex@berk:~$ bash -c 'printf "%x\n" $((0xffffffff94100000 + 0x400000))'
    ffffffff94500000
    alex@berk:~$ dash -c 'printf "%x\n" $((0xffffffff94100000 + 0x400000))'
    80000000003fffff
    ----

    The former is obviously correct whilst the later breaks things royally.

    Fortunately working with only the lower 32bit's works for both bash and
    dash:
    ----
    $ bash -c 'printf "%x\n" $((0x94100000 + 0x400000))'
    94500000
    $ dash -c 'printf "%x\n" $((0x94100000 + 0x400000))'
    94500000
    ----

    So, we can split the original 64bit string to two parts, and only
    calculate the low 32bit part, which is big enough (1GiB kernel sizes
    anyone?) for a normal Linux kernel image file, now, we calculate the
    VMLINUZ_LOAD_ADDRESS like this:

    1. if present, append top 32bit of VMLINUX_LOAD_ADDRESS" as a prefix
    2. get the sum of the low 32bit of VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE

    This patch fixes vmlinuz kernel builds on systems where only a
    32bit-only math shell is available.

    Patch Changelog:
    Version 2
    - simplified method by using 'expr' for 'substr' and making it work
    with dash once again
    Version 1
    - Revert the removals of '-n "$(VMLINUX_SIZE)"' to avoid the error
    of "make clean"
    - Consider more cases of the VMLINUX_LOAD_ADDRESS
    Version 0
    - initial release

    Signed-off-by: Alexander Clouter
    Acked-by: Wu Zhangjin
    Patchwork: http://patchwork.linux-mips.org/patch/861/
    Signed-off-by: Ralf Baechle

    Alexander Clouter
     
  • The necessary changes to the x86 Kconfig and boot/compressed to allow the
    use of this new compression method.

    Signed-off-by: Wu Zhangjin
    Cc: linux-mips@linux-mips.org
    Cc: Sergei Shtylyov
    Patchwork: http://patchwork.linux-mips.org/patch/857/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • Russell King
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] fix single stepped svcs with TRACE_IRQFLAGS=y
    [S390] zcrypt: Do not remove coprocessor for error 8/72
    [S390] sclp_vt220: set initial terminal window size
    [S390] use set_current_state in sigsuspend
    [S390] irqflags: add missing types.h include
    [S390] dasd: fix possible NULL pointer errors

    Linus Torvalds
     

27 Jan, 2010

6 commits


26 Jan, 2010

4 commits

  • Can't reference irq_desc[].affinity when !SMP.

    Reported-by: Alexander Beregalov
    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: x86: Fix leak of free lapic date in kvm_arch_vcpu_init()
    KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks
    KVM: S390: fix potential array overrun in intercept handling
    KVM: fix spurious interrupt with irqfd
    eventfd - allow atomic read and waitqueue remove
    KVM: MMU: bail out pagewalk on kvm_read_guest error
    KVM: properly check max PIC pin in irq route setup
    KVM: only allow one gsi per fd
    KVM: x86: Fix host_mapping_level()
    KVM: powerpc: Show timing option only on embedded
    KVM: Fix race between APIC TMR and IRR

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix IRQ ->set_affinity() methods.
    sparc: cpumask_of_node() should handle -1 as a node
    sparc64: Update defconfig.
    sparc: Add missing SW perf fault events.
    sparc64: Fully support both performance counters.
    sparc64: Add perf callchain support.
    sparc: convert to arch_gettimeoffset()
    sparc: leds_resource.end assigned to itself in clock_board_probe()
    sparc32: Fix page_to_phys().
    sparc: Simplify param.h by simply including
    sparc32: Update defconfig.
    SPARC: use helpers for rlimits
    sparc: copy_from_user() should not return -EFAULT

    Linus Torvalds
     
  • …/git/tmlind/linux-omap-2.6

    * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (25 commits)
    OMAP2/3: DMTIMER: Clear pending interrupts when stopping a timer
    PM debug: Fix warning when no CONFIG_DEBUG_FS
    OMAP3: PM: DSS PM_WKEN to refill DMA
    OMAP: timekeeping: time should not stop during suspend
    OMAP3: PM: Force write last pad config register into save area
    OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()
    OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules
    OMAP3: PM debug: fix build error when !CONFIG_DEBUG_FS
    OMAP3: PM: Removing redundant and potentially dangerous PRCM configration
    OMAP3: Fixed ARM aux ctrl register save/restore
    OMAP3: CPUidle: Fixed timer resolution
    OMAP3: PM: Remove duplicate code blocks
    OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI
    OMAP3: PM: Enable system control module autoidle
    OMAP3: PM: Ack pending interrupts before entering suspend
    omap: Enable GPMC clock in gpmc_init
    OMAP1 clock: fix for "BUG: spinlock lockup on CPU#0"
    OMAP4: clocks: Fix the clksel_rate struct DPLL divs
    OMAP4: PRCM: Fix the base address for CHIRONSS reg defines
    OMAP: dma_chan[lch_head].flag & OMAP_DMA_ACTIVE tested twice in omap_dma_unlink_lch()
    ...

    Linus Torvalds
     

25 Jan, 2010

8 commits

  • In function kvm_arch_vcpu_init(), if the memory malloc for
    vcpu->arch.mce_banks is fail, it does not free the memory
    of lapic date. This patch fixed it.

    Cc: stable@kernel.org
    Signed-off-by: Wei Yongjun
    Signed-off-by: Marcelo Tosatti

    Wei Yongjun
     
  • vcpu->arch.mce_banks is malloc in kvm_arch_vcpu_init(), but
    never free in any place, this may cause memory leak. So this
    patch fixed to free it in kvm_arch_vcpu_uninit().

    Cc: stable@kernel.org
    Signed-off-by: Wei Yongjun
    Signed-off-by: Marcelo Tosatti

    Wei Yongjun
     
  • kvm_handle_sie_intercept uses a jump table to get the intercept handler
    for a SIE intercept. Static code analysis revealed a potential problem:
    the intercept_funcs jump table was defined to contain (0x48 >> 2) entries,
    but we only checked for code > 0x48 which would cause an off-by-one
    array overflow if code == 0x48.

    Use the compiler and ARRAY_SIZE to automatically set the limits.

    Cc: stable@kernel.org
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Marcelo Tosatti

    Christian Borntraeger
     
  • Exit the guest pagetable walk loop if reading gpte failed. Otherwise its
    possible to enter an endless loop processing the previous present pte.

    Cc: stable@kernel.org
    Signed-off-by: Marcelo Tosatti

    Marcelo Tosatti
     
  • When found a error hva, should not return PAGE_SIZE but the level...

    Also clean up the coding style of the following loop.

    Cc: stable@kernel.org
    Signed-off-by: Sheng Yang
    Signed-off-by: Marcelo Tosatti

    Sheng Yang
     
  • Embedded PowerPC KVM has an exit timing implementation to track and evaluate
    how much time was spent in which exit path.

    For Book3S, we don't implement it. So let's not expose it as a config option
    either.

    Signed-off-by: Alexander Graf
    Signed-off-by: Avi Kivity

    Alexander Graf
     
  • When we queue an interrupt to the local apic, we set the IRR before the TMR.
    The vcpu can pick up the IRR and inject the interrupt before setting the TMR,
    and perhaps even EOI it, causing incorrect behaviour.

    The race is really insignificant since it can only occur on the first
    interrupt (usually following interrupts will not change TMR), but it's better
    closed than open.

    Fixed by reordering setting the TMR vs IRR.

    Cc: stable@kernel.org
    Signed-off-by: Avi Kivity
    Signed-off-by: Marcelo Tosatti

    Avi Kivity
     
  • This patch fixes power LED blinking and power-off on DNS-323 rev. B1.

    GPIO pin 3 has to be set to 1 to stop power LED blinking and to allow the LED to be controlled via leds-gpio. This pin has to be also set to 1 for power-off to work.
    To power-off the rev. B1 machine, pin 8 has to be set to 1 and then set to 0 to do actual power-off.

    Tested on my DNS-323 rev. B1

    Signed-off-by: Erik Benada
    Signed-off-by: Nicolas Pitre

    Erik Benada
     

24 Jan, 2010

1 commit

  • CONFIG_X86_CPU_DEBUG, which provides some parsed versions of the x86
    CPU configuration via debugfs, has caused boot failures on real
    hardware. The value of this feature has been marginal at best, as all
    this information is already available to userspace via generic
    interfaces.

    Causes crashes that have not been fixed + minimal utility -> remove.

    See the referenced LKML thread for more information.

    Reported-by: Ozan Çağlayan
    Signed-off-by: H. Peter Anvin
    LKML-Reference:
    Cc: Jaswinder Singh Rajput
    Cc: Linus Torvalds
    Cc: Rafael J. Wysocki
    Cc: Yinghai Lu
    Cc:

    H. Peter Anvin
     

23 Jan, 2010

3 commits

  • Commit d1c84f79a6ba992dc01e312c44a21496303874d6
    leads to a regression when microcode_amd.c is compiled into the kernel.
    It causes a big boot delay because the firmware is not available.
    See http://marc.info/?l=linux-kernel&m=126267290920060

    It also renders the reload sysfs attribute useless.
    Fixing this is too intrusive for an -rc5 kernel.

    Thus I'd like to restore the microcode loading behaviour of kernel
    2.6.32.

    CC: Gene Heskett
    Signed-off-by: Andreas Herrmann
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Andreas Herrmann
     
  • HPET MSI on platforms with ATI SB700/SB800 as they seem to have some
    side-effects on floppy DMA. Do not use HPET MSI on such platforms.

    Original problem report from Mark Hounschell
    http://lkml.indiana.edu/hypermail/linux/kernel/0912.2/01118.html

    [ This patch needs to go to stable as well. But, there are some
    conflicts that prevents the patch from going as is. I can
    rebase/resubmit to stable once the patch goes upstream.
    hpa: still Cc:'ing stable@ as an FYI. ]

    Tested-by: Mark Hounschell
    Signed-off-by: Venkatesh Pallipadi
    Cc:
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Pallipadi, Venkatesh
     
  • nodes_possible_map does not currently include nodes that have SRAT
    entries that are all ACPI_SRAT_MEM_HOT_PLUGGABLE since the bit is
    cleared in nodes_parsed if it does not have an online address range.

    Unequivocally setting the bit in nodes_parsed is insufficient since
    existing code, such as acpi_get_nodes(), assumes all nodes in the map
    have online address ranges. In fact, all code using nodes_parsed
    assumes such nodes represent an address range of online memory.

    nodes_possible_map is created by unioning nodes_parsed and
    cpu_nodes_parsed; the former represents nodes with online memory and
    the latter represents memoryless nodes. We now set the bit for
    hotpluggable nodes in cpu_nodes_parsed so that it also gets set in
    nodes_possible_map.

    [ hpa: Haicheng Li points out that this makes the naming of the
    variable cpu_nodes_parsed somewhat counterintuitive. However, leave
    it as is in the interest of keeping the pure bug fix patch small. ]

    Signed-off-by: David Rientjes
    Tested-by: Haicheng Li
    LKML-Reference:
    Cc:
    Signed-off-by: H. Peter Anvin

    David Rientjes
     

22 Jan, 2010

1 commit

  • OMAP GP timers keep running for a few cycles after they are stopped,
    which can cause the timer to expire and generate an interrupt. The
    pending interrupt will prevent e.g. OMAP from entering suspend, thus
    we ack it manually. Only applicable on OMAP2/3/4.

    Signed-off-by: Tero Kristo
    Signed-off-by: Kevin Hilman
    Signed-off-by: Tony Lindgren

    Tero Kristo