13 Dec, 2011

1 commit


12 Dec, 2011

5 commits


10 Dec, 2011

3 commits


09 Dec, 2011

4 commits

  • With the 3.2-rc kernel, IOMMU 2M pages in KVM works. But when I tried
    to use IOMMU 1GB pages in KVM, I encountered an oops and the 1GB page
    failed to be used.

    The root cause is that 1GB page allocation calls gup_huge_pud() while 2M
    page calls gup_huge_pmd. If compound pages are used and the page is a
    tail page, gup_huge_pmd() increases _mapcount to record tail page are
    mapped while gup_huge_pud does not do that.

    So when the mapped page is relesed, it will result in kernel oops
    because the page is not marked mapped.

    This patch add tail process for compound page in 1GB huge page which
    keeps the same process as 2M page.

    Reproduce like:
    1. Add grub boot option: hugepagesz=1G hugepages=8
    2. mount -t hugetlbfs -o pagesize=1G hugetlbfs /dev/hugepages
    3. qemu-kvm -m 2048 -hda os-kvm.img -cpu kvm64 -smp 4 -mem-path /dev/hugepages
    -net none -device pci-assign,host=07:00.1

    kernel BUG at mm/swap.c:114!
    invalid opcode: 0000 [#1] SMP
    Call Trace:
    put_page+0x15/0x37
    kvm_release_pfn_clean+0x31/0x36
    kvm_iommu_put_pages+0x94/0xb1
    kvm_iommu_unmap_memslots+0x80/0xb6
    kvm_assign_device+0xba/0x117
    kvm_vm_ioctl_assigned_device+0x301/0xa47
    kvm_vm_ioctl+0x36c/0x3a2
    do_vfs_ioctl+0x49e/0x4e4
    sys_ioctl+0x5a/0x7c
    system_call_fastpath+0x16/0x1b
    RIP put_compound_page+0xd4/0x168

    Signed-off-by: Youquan Song
    Reviewed-by: Andrea Arcangeli
    Cc: Andi Kleen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Youquan Song
     
  • If we encounter an efi_memory_desc_t without EFI_MEMORY_WB set
    in ->attribute we currently call set_memory_uc(), which in turn
    calls __pa() on a potentially ioremap'd address.

    On CONFIG_X86_32 this is invalid, resulting in the following
    oops on some machines:

    BUG: unable to handle kernel paging request at f7f22280
    IP: [] reserve_ram_pages_type+0x89/0x210
    [...]

    Call Trace:
    [] ? page_is_ram+0x1a/0x40
    [] reserve_memtype+0xdf/0x2f0
    [] set_memory_uc+0x49/0xa0
    [] efi_enter_virtual_mode+0x1c2/0x3aa
    [] start_kernel+0x291/0x2f2
    [] ? loglevel+0x1b/0x1b
    [] i386_start_kernel+0xbf/0xc8

    A better approach to this problem is to map the memory region
    with the correct attributes from the start, instead of modifying
    it after the fact. The uncached case can be handled by
    ioremap_nocache() and the cached by ioremap_cache().

    Despite first impressions, it's not possible to use
    ioremap_cache() to map all cached memory regions on
    CONFIG_X86_64 because EFI_RUNTIME_SERVICES_DATA regions really
    don't like being mapped into the vmalloc space, as detailed in
    the following bug report,

    https://bugzilla.redhat.com/show_bug.cgi?id=748516

    Therefore, we need to ensure that any EFI_RUNTIME_SERVICES_DATA
    regions are covered by the direct kernel mapping table on
    CONFIG_X86_64. To accomplish this we now map E820_RESERVED_EFI
    regions via the direct kernel mapping with the initial call to
    init_memory_mapping() in setup_arch(), whereas previously these
    regions wouldn't be mapped if they were after the last E820_RAM
    region until efi_ioremap() was called. Doing it this way allows
    us to delete efi_ioremap() completely.

    Signed-off-by: Matt Fleming
    Cc: H. Peter Anvin
    Cc: Matthew Garrett
    Cc: Zhang Rui
    Cc: Huang Ying
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1321621751-3650-1-git-send-email-matt@console-pimps.org
    Signed-off-by: Ingo Molnar

    Matt Fleming
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
    ARM: sa1100: fix build error
    ARM: OMAP1: recalculate loops per jiffy after dpll1 reprogram
    ARM: davinci: dm365 evm: align nand partition table to u-boot
    ARM: davinci: da850 evm: change audio edma event queue to EVENTQ_0
    ARM: davinci: dm646x evm: wrong register used in setup_vpif_input_channel_mode
    ARM: davinci: dm646x does not have a DSP domain
    ARM: davinci: psc: fix incorrect offsets
    ARM: davinci: psc: fix incorrect mask
    ARM: mx28: LRADC macro rename
    arm: mx23: recognise stmp378x as mx23
    ARM: mxs: fix machines' initializers order
    ARM: mxs/tx28: add __initconst for fec pdata
    ARM: S3C64XX: Staticise s3c6400_sysclass
    ARM: S3C64XX: Add linux/export.h to dev-spi.c
    ARM: S3C64XX: Remove extern from definition of framebuffer setup call
    MAINTAINERS: Extend Samsung patterns to cover SPI and ASoC drivers
    MAINTAINERS: Add linux-samsung-soc mailing list for Samsung
    MAINTAINERS: Consolidate Samsung MAINTAINERS
    ARM: CSR: PM: fix build error due to undeclared 'THIS_MODULE'
    ARM: CSR: fix build error due to new mdesc->dma_zone_size
    ...

    Linus Torvalds
     
  • When HPET is operating in RTC mode, the TN_ENABLE bit on timer1
    controls whether the HPET or the RTC delivers interrupts to irq8. When
    the system goes into suspend, the RTC driver sends a signal to the
    HPET driver so that the HPET releases control of irq8, allowing the
    RTC to wake the system from suspend. The switchover is accomplished by
    a write to the HPET configuration registers which currently only
    occurs while servicing the HPET interrupt.

    On some systems, I have seen the system suspend before an HPET
    interrupt occurs, preventing the write to the HPET configuration
    register and leaving the HPET in control of the irq8. As the HPET is
    not active during suspend, it does not generate a wake signal and RTC
    alarms do not work.

    This patch forces the HPET driver to immediately transfer control of
    the irq8 channel to the RTC instead of waiting until the next
    interrupt event.

    Signed-off-by: Mark Langsdorf
    Link: http://lkml.kernel.org/r/20111118153306.GB16319@alberich.amd.com
    Tested-by: Andreas Herrmann
    Signed-off-by: Andreas Herrmann
    Signed-off-by: Thomas Gleixner
    Cc: stable@vger.kernel.org

    Mark Langsdorf
     

08 Dec, 2011

4 commits


07 Dec, 2011

2 commits


06 Dec, 2011

16 commits

  • Arnd Bergmann
     
  • Arnd Bergmann
     
  • Arnd Bergmann
     
  • Arnd Bergmann
     
  • Arnd Bergmann
     
  • If we select a symbol it should have a type declared first
    otherwise in some situations the config tools get upset. They
    are currently perhaps a bit too resilient which is why this
    wasn't noticed initially.

    Signed-off-by: Alan Cox
    Link: http://lkml.kernel.org/r/20111206132811.4041.32549.stgit@bob.linux.org.uk
    Signed-off-by: Ingo Molnar

    Alan Cox
     
  • We currently fail to build on CONFIG_X86_INTEL_MID=y and
    CONFIG_X86_MRST unset.

    We could build all the bits to make generic MID work if you
    picked MID platform alone but that's really silly. Instead use
    select and two variables.

    This looks a bit daft right now but once we add a Medfield
    selection it'll start to look a good deal more sensible.

    Reported-by: Ingo Molnar
    Reported-by: Stanislaw Gruszka
    Signed-off-by: Alan Cox
    Link: http://lkml.kernel.org/r/20111205231433.28811.51297.stgit@bob.linux.org.uk
    Signed-off-by: Ingo Molnar

    Alan Cox
     
  • Fix compile error due to missing include.

    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • * '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

    Linus Torvalds
     
  • * '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)

    Linus Torvalds
     
  • * '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

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] ap: Setup timer for sending messages after reset.
    [S390] cio: fix chsc_chp_vary
    [S390] cio: provide fake irb for transport mode IO
    [S390] cio: disallow driver io for known to be broken paths
    [S390] hibernate: directly trigger subchannel evaluation
    [S390] remove reset of system call restart on psw changes
    [S390] add missing .set function for NT_S390_LAST_BREAK regset
    [S390] fix page change underindication in pgste_update_all
    [S390] ptrace inferior call interactions with TIF_SYSCALL
    [S390] kdump: Replace is_kdump_kernel() with OLDMEM_BASE check

    Linus Torvalds
     
  • Otherwise timing is inaccurate, resulting in devices which depend on it,
    like omap-keypad, broken.

    Tested on Amstrad Delta.

    Signed-off-by: Janusz Krzysztofik
    [tony@atomide.com: removed comment referencing a development branch]
    Signed-off-by: Tony Lindgren

    Janusz Krzysztofik
     
  • I've received complaints that the numa_node attribute for family
    15h model 00-0fh (e.g. Interlagos) northbridge functions shows
    -1 instead of the proper node ID.

    Correct this with attached quirks (similar to quirks for other
    AMD CPU families used in multi-socket systems).

    Signed-off-by: Andreas Herrmann
    Cc: Frank Arnold
    Cc: Borislav Petkov
    Link: http://lkml.kernel.org/r/20111202072143.GA31916@alberich.amd.com
    Signed-off-by: Ingo Molnar

    Andreas Herrmann
     
  • Intel MID x86 platforms have a memory mapped virtual RTC
    instead. No MID platform have the default ports (and
    accessing them may do weird stuff).

    Signed-off-by: Mathias Nyman
    Signed-off-by: Alan Cox
    Cc: feng.tang@intel.com
    Cc: Feng Tang
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Mathias Nyman
     
  • Fix an outstanding issue that has been reported since 2.6.37.
    Under a heavy loaded machine processing "fork()" calls could
    crash with:

    BUG: unable to handle kernel paging request at f573fc8c
    IP: [] swap_count_continued+0x104/0x180
    *pdpt = 000000002a3b9027 *pde = 0000000001bed067 *pte = 0000000000000000 Oops: 0000 [#1] SMP
    Modules linked in:
    Pid: 1638, comm: apache2 Not tainted 3.0.4-linode37 #1
    EIP: 0061:[] EFLAGS: 00210246 CPU: 3
    EIP is at swap_count_continued+0x104/0x180
    .. snip..
    Call Trace:
    [] ? __swap_duplicate+0xc2/0x160
    [] ? pte_mfn_to_pfn+0x87/0xe0
    [] ? swap_duplicate+0x14/0x40
    [] ? copy_pte_range+0x45b/0x500
    [] ? copy_page_range+0x195/0x200
    [] ? dup_mmap+0x1c6/0x2c0
    [] ? dup_mm+0xa8/0x130
    [] ? copy_process+0x98a/0xb30
    [] ? do_fork+0x4f/0x280
    [] ? getnstimeofday+0x43/0x100
    [] ? sys_clone+0x30/0x40
    [] ? ptregs_clone+0x15/0x48
    [] ? syscall_call+0x7/0xb

    The problem is that in copy_page_range() we turn lazy mode on,
    and then in swap_entry_free() we call swap_count_continued()
    which ends up in:

    map = kmap_atomic(page, KM_USER0) + offset;

    and then later we touch *map.

    Since we are running in batched mode (lazy) we don't actually
    set up the PTE mappings and the kmap_atomic is not done
    synchronously and ends up trying to dereference a page that has
    not been set.

    Looking at kmap_atomic_prot_pfn(), it uses
    'arch_flush_lazy_mmu_mode' and doing the same in
    kmap_atomic_prot() and __kunmap_atomic() makes the problem go
    away.

    Interestingly, commit b8bcfe997e4615 ("x86/paravirt: remove lazy
    mode in interrupts") removed part of this to fix an interrupt
    issue - but it went to far and did not consider this scenario.

    Signed-off-by: Konrad Rzeszutek Wilk
    Cc: Peter Zijlstra
    Cc: Jeremy Fitzhardinge
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Konrad Rzeszutek Wilk
     

05 Dec, 2011

5 commits

  • Ingo Molnar
     
  • Looks like on some Acer Aspire 1s with older bioses, reboot via bios
    fails. It works on my machine, (with BIOS version 0.3310) but
    not on some others (BIOS version 0.3309).

    There's a log of problems at:

    https://bbs.archlinux.org/viewtopic.php?id=124136

    This patch adds a different callback to the reboot quirk table,
    to allow rebooting via keybaord controller.

    Reported-by: Uroš Vampl
    Tested-by: Vasily Khoruzhick
    Signed-off-by: Peter Chubb
    Cc: Don Zickus
    Cc: Peter Zijlstra
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/1323093233-9481-1-git-send-email-anarsoul@gmail.com
    Signed-off-by: Ingo Molnar

    Peter Chubb
     
  • Following is from Notes of section 11.5.3 of Intel processor
    manual available at:

    http://www.intel.com/Assets/PDF/manual/325384.pdf

    For the Pentium 4 and Intel Xeon processors, after the sequence of
    steps given above has been executed, the cache lines containing the
    code between the end of the WBINVD instruction and before the
    MTRRS have actually been disabled may be retained in the cache
    hierarchy. Here, to remove code from the cache completely, a
    second WBINVD instruction must be executed after the MTRRs have
    been disabled.

    This patch provides resolution for that.

    Ideally, I will like to make changes only for Pentium 4 and Xeon
    processors. But, I am not finding easier way to do it.
    And, extra wbinvd() instruction does not hurt much for other
    processors.

    Signed-off-by: Ajaykumar Hotchandani
    Cc: Linus Torvalds
    Cc: Arjan van de Ven
    Cc: Lucas De Marchi
    Link: http://lkml.kernel.org/r/4EBD1CC5.3030008@oracle.com
    Signed-off-by: Ingo Molnar

    Ajaykumar Hotchandani
     
  • Recently, I got bitten by using rdmsr_safe too early in the boot
    process. Document its shortcomings for future reference.

    Link: http://lkml.kernel.org/r/4ED5B70F.606@lwfinger.net
    Signed-off-by: Borislav Petkov

    Borislav Petkov
     
  • The microcode update driver's initialization code does not handle
    failures correctly. This patch fixes this issue.

    Signed-off-by: Jan Beulich
    Signed-off-by: Srivatsa S. Bhat
    Link: http://lkml.kernel.org/r/20111107123530.12164.31227.stgit@srivatsabhat.in.ibm.com
    Link: http://lkml.kernel.org/r/4ED8E2270200007800065120@nat28.tlf.novell.com
    Signed-off-by: Borislav Petkov

    Srivatsa S. Bhat