31 Oct, 2011

2 commits

  • * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (75 commits)
    KVM: SVM: Keep intercepting task switching with NPT enabled
    KVM: s390: implement sigp external call
    KVM: s390: fix register setting
    KVM: s390: fix return value of kvm_arch_init_vm
    KVM: s390: check cpu_id prior to using it
    KVM: emulate lapic tsc deadline timer for guest
    x86: TSC deadline definitions
    KVM: Fix simultaneous NMIs
    KVM: x86 emulator: convert push %sreg/pop %sreg to direct decode
    KVM: x86 emulator: switch lds/les/lss/lfs/lgs to direct decode
    KVM: x86 emulator: streamline decode of segment registers
    KVM: x86 emulator: simplify OpMem64 decode
    KVM: x86 emulator: switch src decode to decode_operand()
    KVM: x86 emulator: qualify OpReg inhibit_byte_regs hack
    KVM: x86 emulator: switch OpImmUByte decode to decode_imm()
    KVM: x86 emulator: free up some flag bits near src, dst
    KVM: x86 emulator: switch src2 to generic decode_operand()
    KVM: x86 emulator: expand decode flags to 64 bits
    KVM: x86 emulator: split dst decode to a generic decode_operand()
    KVM: x86 emulator: move memop, memopp into emulation context
    ...

    Linus Torvalds
     
  • * 'fbdev-next' of git://github.com/schandinat/linux-2.6: (270 commits)
    video: platinumfb: Add __devexit_p at necessary place
    drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
    drivers/video: fsl-diu-fb: merge diu_hw into fsl_diu_data
    drivers/video: fsl-diu-fb: only DIU modes 0 and 1 are supported
    drivers/video: fsl-diu-fb: remove unused panel operating mode support
    drivers/video: fsl-diu-fb: use an enum for the AOI index
    drivers/video: fsl-diu-fb: add several new video modes
    drivers/video: fsl-diu-fb: remove broken screen blanking support
    drivers/video: fsl-diu-fb: move some definitions out of the header file
    drivers/video: fsl-diu-fb: fix some ioctls
    video: da8xx-fb: Increased resolution configuration of revised LCDC IP
    OMAPDSS: picodlp: add missing #include
    fb: fix au1100fb bitrot.
    mx3fb: fix NULL pointer dereference in screen blanking.
    video: irq: Remove IRQF_DISABLED
    smscufx: change edid data to u8 instead of char
    OMAPDSS: DISPC: zorder support for DSS overlays
    OMAPDSS: DISPC: VIDEO3 pipeline support
    OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting
    video/omap: fix build dependencies
    ...

    Fix up conflicts in:
    - drivers/staging/xgifb/XGI_main_26.c
    Changes to XGIfb_pan_var()
    - drivers/video/omap/{lcd_apollon.c,lcd_ldp.c,lcd_overo.c}
    Removed (or in the case of apollon.c, merged into the generic
    DSS panel in drivers/video/omap2/displays/panel-generic-dpi.c)

    Linus Torvalds
     

29 Oct, 2011

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue: (21 commits)
    leases: fix write-open/read-lease race
    nfs: drop unnecessary locking in llseek
    ext4: replace cut'n'pasted llseek code with generic_file_llseek_size
    vfs: add generic_file_llseek_size
    vfs: do (nearly) lockless generic_file_llseek
    direct-io: merge direct_io_walker into __blockdev_direct_IO
    direct-io: inline the complete submission path
    direct-io: separate map_bh from dio
    direct-io: use a slab cache for struct dio
    direct-io: rearrange fields in dio/dio_submit to avoid holes
    direct-io: fix a wrong comment
    direct-io: separate fields only used in the submission path from struct dio
    vfs: fix spinning prevention in prune_icache_sb
    vfs: add a comment to inode_permission()
    vfs: pass all mask flags check_acl and posix_acl_permission
    vfs: add hex format for MAY_* flag values
    vfs: indicate that the permission functions take all the MAY_* flags
    compat: sync compat_stats with statfs.
    vfs: add "device" tag to /proc/self/mountstats
    cleanup: vfs: small comment fix for block_invalidatepage
    ...

    Fix up trivial conflict in fs/gfs2/file.c (llseek changes)

    Linus Torvalds
     

28 Oct, 2011

1 commit

  • This was found by inspection while tracking a similar
    bug in compat_statfs64, that has been fixed in mainline
    since decemeber.

    - This fixes a bug where not all of the f_spare fields
    were cleared on mips and s390.
    - Add the f_flags field to struct compat_statfs
    - Copy f_flags to userspace in case someone cares.
    - Use __clear_user to copy the f_spare field to userspace
    to ensure that all of the elements of f_spare are cleared.
    On some architectures f_spare is has 5 ints and on some
    architectures f_spare only has 4 ints. Which makes
    the previous technique of clearing each int individually
    broken.

    I don't expect anyone actually uses the old statfs system
    call anymore but if they do let them benefit from having
    the compat and the native version working the same.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Christoph Hellwig

    Eric W. Biederman
     

26 Oct, 2011

2 commits

  • * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
    rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
    lockdep: Comment all warnings
    lib: atomic64: Change the type of local lock to raw_spinlock_t
    locking, lib/atomic64: Annotate atomic64_lock::lock as raw
    locking, x86, iommu: Annotate qi->q_lock as raw
    locking, x86, iommu: Annotate irq_2_ir_lock as raw
    locking, x86, iommu: Annotate iommu->register_lock as raw
    locking, dma, ipu: Annotate bank_lock as raw
    locking, ARM: Annotate low level hw locks as raw
    locking, drivers/dca: Annotate dca_lock as raw
    locking, powerpc: Annotate uic->lock as raw
    locking, x86: mce: Annotate cmci_discover_lock as raw
    locking, ACPI: Annotate c3_lock as raw
    locking, oprofile: Annotate oprofilefs lock as raw
    locking, video: Annotate vga console lock as raw
    locking, latencytop: Annotate latency_lock as raw
    locking, timer_stats: Annotate table_lock as raw
    locking, rwsem: Annotate inner lock as raw
    locking, semaphores: Annotate inner lock as raw
    locking, sched: Annotate thread_group_cputimer as raw
    ...

    Fix up conflicts in kernel/posix-cpu-timers.c manually: making
    cputimer->cputime a raw lock conflicted with the ABBA fix in commit
    bcd5cff7216f ("cputimer: Cure lock inversion").

    Linus Torvalds
     
  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
    TTY: serial_core: Fix crash if DCD drop during suspend
    tty/serial: atmel_serial: bootconsole removed from auto-enumerates
    Revert "TTY: call tty_driver_lookup_tty unconditionally"
    tty/serial: atmel_serial: add device tree support
    tty/serial: atmel_serial: auto-enumerate ports
    tty/serial: atmel_serial: whitespace and braces modifications
    tty/serial: atmel_serial: change platform_data variable name
    tty/serial: RS485 bindings for device tree
    TTY: call tty_driver_lookup_tty unconditionally
    TTY: pty, release tty in all ptmx_open fail paths
    TTY: make tty_add_file non-failing
    TTY: drop driver reference in tty_open fail path
    8250_pci: Fix kernel panic when pch_uart is disabled
    h8300: drivers/serial/Kconfig was moved
    parport_pc: release IO region properly if unsupported ITE887x card is found
    tty: Support compat_ioctl get/set termios_locked
    hvc_console: display printk messages on console.
    TTY: snyclinkmp: forever loop in tx_load_dma_buffer()
    tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output
    tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)
    ...

    Fix up Conflicts in:
    - drivers/tty/serial/8250_pci.c
    Trivial conflict with removed duplicate device ID
    - drivers/tty/serial/atmel_serial.c
    Annoying silly conflict between "specify the port num via
    platform_data" and other changes to atmel_console_init

    Linus Torvalds
     

25 Oct, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits)
    dp83640: free packet queues on remove
    dp83640: use proper function to free transmit time stamping packets
    ipv6: Do not use routes from locally generated RAs
    |PATCH net-next] tg3: add tx_dropped counter
    be2net: don't create multiple RX/TX rings in multi channel mode
    be2net: don't create multiple TXQs in BE2
    be2net: refactor VF setup/teardown code into be_vf_setup/clear()
    be2net: add vlan/rx-mode/flow-control config to be_setup()
    net_sched: cls_flow: use skb_header_pointer()
    ipv4: avoid useless call of the function check_peer_pmtu
    TCP: remove TCP_DEBUG
    net: Fix driver name for mdio-gpio.c
    ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT
    rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces
    ipv4: fix ipsec forward performance regression
    jme: fix irq storm after suspend/resume
    route: fix ICMP redirect validation
    net: hold sock reference while processing tx timestamps
    tcp: md5: add more const attributes
    Add ethtool -g support to virtio_net
    ...

    Fix up conflicts in:
    - drivers/net/Kconfig:
    The split-up generated a trivial conflict with removal of a
    stale reference to Documentation/networking/net-modules.txt.
    Remove it from the new location instead.
    - fs/sysfs/dir.c:
    Fairly nasty conflicts with the sysfs rb-tree usage, conflicting
    with Eric Biederman's changes for tagged directories.

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits)
    MAINTAINERS: linux-m32r is moderated for non-subscribers
    linux@lists.openrisc.net is moderated for non-subscribers
    Drop default from "DM365 codec select" choice
    parisc: Kconfig: cleanup Kernel page size default
    Kconfig: remove redundant CONFIG_ prefix on two symbols
    cris: remove arch/cris/arch-v32/lib/nand_init.S
    microblaze: add missing CONFIG_ prefixes
    h8300: drop puzzling Kconfig dependencies
    MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers
    tty: drop superfluous dependency in Kconfig
    ARM: mxc: fix Kconfig typo 'i.MX51'
    Fix file references in Kconfig files
    aic7xxx: fix Kconfig references to READMEs
    Fix file references in drivers/ide/
    thinkpad_acpi: Fix printk typo 'bluestooth'
    bcmring: drop commented out line in Kconfig
    btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888'
    doc: raw1394: Trivial typo fix
    CIFS: Don't free volume_info->UNC until we are entirely done with it.
    treewide: Correct spelling of successfully in comments
    ...

    Linus Torvalds
     

15 Oct, 2011

1 commit


14 Oct, 2011

1 commit


08 Oct, 2011

1 commit


05 Oct, 2011

1 commit

  • The Freescale DIU video controller supports five video "modes", but only
    the first two are used by the driver. The other three are special modes
    that don't make sense for a framebuffer driver. Therefore, there's no
    point in keeping a global variable that indicates which mode we're
    supposed to use.

    Signed-off-by: Timur Tabi
    Signed-off-by: Florian Tobias Schandinat

    Timur Tabi
     

30 Sep, 2011

1 commit

  • Apple Quad G5 has some oddity in it's device-tree which causes the new
    generic matching code to fail to relate nodes for PCI-E devices below U4
    with their respective struct pci_dev. This breaks graphics on those
    machines among others.

    This fixes it using a quirk which copies the node pointer from the host
    bridge for the root complex, which makes the generic code work for the
    children afterward.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

26 Sep, 2011

14 commits

  • With a KVM guest operating in SMT4 mode (i.e. 4 hardware threads per
    core), whenever a CPU goes idle, we have to pull all the other
    hardware threads in the core out of the guest, because the H_CEDE
    hcall is handled in the kernel. This is inefficient.

    This adds code to book3s_hv_rmhandlers.S to handle the H_CEDE hcall
    in real mode. When a guest vcpu does an H_CEDE hcall, we now only
    exit to the kernel if all the other vcpus in the same core are also
    idle. Otherwise we mark this vcpu as napping, save state that could
    be lost in nap mode (mainly GPRs and FPRs), and execute the nap
    instruction. When the thread wakes up, because of a decrementer or
    external interrupt, we come back in at kvm_start_guest (from the
    system reset interrupt vector), find the `napping' flag set in the
    paca, and go to the resume path.

    This has some other ramifications. First, when starting a core, we
    now start all the threads, both those that are immediately runnable and
    those that are idle. This is so that we don't have to pull all the
    threads out of the guest when an idle thread gets a decrementer interrupt
    and wants to start running. In fact the idle threads will all start
    with the H_CEDE hcall returning; being idle they will just do another
    H_CEDE immediately and go to nap mode.

    This required some changes to kvmppc_run_core() and kvmppc_run_vcpu().
    These functions have been restructured to make them simpler and clearer.
    We introduce a level of indirection in the wait queue that gets woken
    when external and decrementer interrupts get generated for a vcpu, so
    that we can have the 4 vcpus in a vcore using the same wait queue.
    We need this because the 4 vcpus are being handled by one thread.

    Secondly, when we need to exit from the guest to the kernel, we now
    have to generate an IPI for any napping threads, because an HDEC
    interrupt doesn't wake up a napping thread.

    Thirdly, we now need to be able to handle virtual external interrupts
    and decrementer interrupts becoming pending while a thread is napping,
    and deliver those interrupts to the guest when the thread wakes.
    This is done in kvmppc_cede_reentry, just before fast_guest_return.

    Finally, since we are not using the generic kvm_vcpu_block for book3s_hv,
    and hence not calling kvm_arch_vcpu_runnable, we can remove the #ifdef
    from kvm_arch_vcpu_runnable.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This simplifies the way that the book3s_pr makes the transition to
    real mode when entering the guest. We now call kvmppc_entry_trampoline
    (renamed from kvmppc_rmcall) in the base kernel using a normal function
    call instead of doing an indirect call through a pointer in the vcpu.
    If kvm is a module, the module loader takes care of generating a
    trampoline as it does for other calls to functions outside the module.

    kvmppc_entry_trampoline then disables interrupts and jumps to
    kvmppc_handler_trampoline_enter in real mode using an rfi[d].
    That then uses the link register as the address to return to
    (potentially in module space) when the guest exits.

    This also simplifies the way that we call the Linux interrupt handler
    when we exit the guest due to an external, decrementer or performance
    monitor interrupt. Instead of turning on the MMU, then deciding that
    we need to call the Linux handler and turning the MMU back off again,
    we now go straight to the handler at the point where we would turn the
    MMU on. The handler will then return to the virtual-mode code
    (potentially in the module).

    Along the way, this moves the setting and clearing of the HID5 DCBZ32
    bit into real-mode interrupts-off code, and also makes sure that
    we clear the MSR[RI] bit before loading values into SRR0/1.

    The net result is that we no longer need any code addresses to be
    stored in vcpu->arch.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This makes arch/powerpc/kvm/book3s_rmhandlers.S and
    arch/powerpc/kvm/book3s_hv_rmhandlers.S be assembled as
    separate compilation units rather than having them #included in
    arch/powerpc/kernel/exceptions-64s.S. We no longer have any
    conditional branches between the exception prologs in
    exceptions-64s.S and the KVM handlers, so there is no need to
    keep their contents close together in the vmlinux image.

    In their current location, they are using up part of the limited
    space between the first-level interrupt handlers and the firmware
    NMI data area at offset 0x7000, and with some kernel configurations
    this area will overflow (e.g. allyesconfig), leading to an
    "attempt to .org backwards" error when compiling exceptions-64s.S.

    Moving them out requires that we add some #includes that the
    book3s_{,hv_}rmhandlers.S code was previously getting implicitly
    via exceptions-64s.S.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • There are multiple features in PowerPC KVM that can now be enabled
    depending on the user's wishes. Some of the combinations don't make
    sense or don't work though.

    So this patch adds a way to check if the executing environment would
    actually be able to run the guest properly. It also adds sanity
    checks if PVR is set (should always be true given the current code
    flow), if PAPR is only used with book3s_64 where it works and that
    HV KVM is only used in PAPR mode.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • Now that Book3S PV mode can also run PAPR guests, we can add a PAPR cap and
    enable it for all Book3S targets. Enabling that CAP switches KVM into PAPR
    mode.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • PAPR defines hypercalls as SC1 instructions. Using these, the guest modifies
    page tables and does other privileged operations that it wouldn't be allowed
    to do in supervisor mode.

    This patch adds support for PR KVM to trap these instructions and route them
    through the same PAPR hypercall interface that we already use for HV style
    KVM.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • Recent Linux versions use the CFAR and PURR SPRs, but don't really care about
    their contents (yet). So for now, we can simply return 0 when the guest wants
    to read them.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • When running a PAPR guest, we need to handle a few hypercalls in kernel space,
    most prominently the page table invalidation (to sync the shadows).

    So this patch adds handling for a few PAPR hypercalls to PR mode KVM. I tried
    to share the code with HV mode, but it ended up being a lot easier this way
    around, as the two differ too much in those details.

    Signed-off-by: Alexander Graf

    ---

    v1 -> v2:

    - whitespace fix

    Alexander Graf
     
  • Until now, we always set HIOR based on the PVR, but this is just wrong.
    Instead, we should be setting HIOR explicitly, so user space can decide
    what the initial HIOR value is - just like on real hardware.

    We keep the old PVR based way around for backwards compatibility, but
    once user space uses the SREGS based method, we drop the PVR logic.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • We have a few traps where we cache the instruction that cause the trap
    for analysis later on. Since we now need to be able to distinguish
    between SC 0 and SC 1 system calls and the only way to find out which
    is which is by looking at the instruction, we also read out the instruction
    causing the system call.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • When running a PAPR guest, the guest is not allowed to set SDR1 - instead
    the HTAB information is held in internal hypervisor structures. But all of
    our current code relies on SDR1 and walking the HTAB like on real hardware.

    So in order to not be too intrusive, we simply set SDR1 to the HTAB we hold
    in host memory. That way we can keep the HTAB in user space, but use it from
    kernel space to map the guest.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • We have 3 privilege levels: problem state, supervisor state and hypervisor
    state. Each of them can access different SPRs, so we need to check on every
    SPR if it's accessible in the respective mode.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • When running a PAPR guest, some things change. The privilege level drops
    from hypervisor to supervisor, SDR1 gets treated differently and we interpret
    hypercalls. For bisectability sake, add the flag now, but only enable it when
    all the support code is there.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • We need the compute_tlbie_rb in _pr and _hv implementations for papr
    soon, so let's move it over to a common header file that both
    implementations can leverage.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

15 Sep, 2011

2 commits


13 Sep, 2011

1 commit

  • uic->lock is protecting the interrupt controller hardware. This lock
    can not be preempted on -rt.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Reported-by: Darcy L. Watkins
    Signed-off-by: Thomas Gleixner
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

31 Aug, 2011

4 commits


30 Aug, 2011

1 commit

  • These were missed in commit f5b940997397 "All Arch: remove linkage
    for sys_nfsservctl system call" due to them having no sys_ prefix
    (presumably).

    Cc: NeilBrown
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-parisc@vger.kernel.org
    Signed-off-by: Stephen Rothwell
    Acked-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

29 Aug, 2011

1 commit


26 Aug, 2011

1 commit

  • This bug causes the IECSR register clear failure. In this case, the RETE
    (retry error threshold exceeded) interrupt will be generated and cannot be
    cleared. So the related ISR may be called persistently.

    The RETE bit in IECSR is cleared by writing a 1 to it.

    Signed-off-by: Liu Gang
    Cc: Benjamin Herrenschmidt
    Cc: Kumar Gala
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Liu Gang-B34182
     

24 Aug, 2011

1 commit

  • The ePAPR embedded hypervisor specification provides an API for "byte
    channels", which are serial-like virtual devices for sending and receiving
    streams of bytes. This driver provides Linux kernel support for byte
    channels via three distinct interfaces:

    1) An early-console (udbg) driver. This provides early console output
    through a byte channel. The byte channel handle must be specified in a
    Kconfig option.

    2) A normal console driver. Output is sent to the byte channel designated
    for stdout in the device tree. The console driver is for handling kernel
    printk calls.

    3) A tty driver, which is used to handle user-space input and output. The
    byte channel used for the console is designated as the default tty.

    Signed-off-by: Timur Tabi
    Signed-off-by: Greg Kroah-Hartman

    Timur Tabi