24 Nov, 2011

7 commits

  • * git://github.com/rustyrussell/linux:
    virtio-pci: make reset operation safer
    virtio-mmio: Correct the name of the guest features selector
    virtio: add HAS_IOMEM dependency to MMIO platform bus driver

    Linus Torvalds
     
  • virtio pci device reset actually just does an I/O
    write, which in PCI is really posted, that is it
    can complete on CPU before the device has received it.

    Further, interrupts might have been pending on
    another CPU, so device callback might get invoked after reset.

    This conflicts with how drivers use reset, which is typically:
    reset
    unregister
    a callback running after reset completed can race with
    unregister, potentially leading to use after free bugs.

    Fix by flushing out the write, and flushing pending interrupts.

    This assumes that device is never reset from
    its vq/config callbacks, or in parallel with being
    added/removed, document this assumption.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell

    Michael S. Tsirkin
     
  • Guest features selector spelling mistake.

    Cc: Pawel Moll
    Cc: Rusty Russell
    Cc: virtualization@lists.linux-foundation.org
    Signed-off-by: Sasha Levin
    Signed-off-by: Rusty Russell

    Sasha Levin
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
    PCI hotplug: shpchp: don't blindly claim non-AMD 0x7450 device IDs
    PCI: pciehp: wait 100 ms after Link Training check
    PCI: pciehp: wait 1000 ms before Link Training check
    PCI: pciehp: Retrieve link speed after link is trained
    PCI: Let PCI_PRI depend on PCI
    PCI: Fix compile errors with PCI_ATS and !PCI_IOV
    PCI / ACPI: Make acpiphp ignore root bridges using PCIe native hotplug

    Linus Torvalds
     
  • * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    i2c: Make i2cdev_notifier_call static
    i2c: Delete ANY_I2C_BUS
    i2c: Fix device name for 10-bit slave address
    i2c-algo-bit: Generate correct i2c address sequence for 10-bit target

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
    regulator: TPS65910: Fix VDD1/2 voltage selector count

    Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits)
    drm: integer overflow in drm_mode_dirtyfb_ioctl()
    drivers/gpu/vga/vgaarb.c: add missing kfree
    drm/radeon/kms/atom: unify i2c gpio table handling
    drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
    ttm: Don't return the bo reserved on error path
    drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS
    drm/i915: Fix inconsistent backlight level during disabled
    drm, i915: Fix memory leak in i915_gem_busy_ioctl().
    drm/i915: Use DPCD value for max DP lanes.
    drm/i915: Initiate DP link training only on the lanes we'll be using
    drm/i915: Remove trailing white space
    drm/i915: Try harder during dp pattern 1 link training
    drm/i915: Make DP prepare/commit consistent with DP dpms
    drm/i915: Let panel power sequencing hardware do its job
    drm/i915: Treat PCH eDP like DP in most places
    drm/i915: Remove link_status field from intel_dp structure
    drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control
    drm/i915: Module parameters using '-1' as default must be signed type
    drm/i915: Turn on another required clock gating bit on gen6.
    drm/i915: Turn on a required 3D clock gating bit on Sandybridge.
    ...

    Linus Torvalds
     

23 Nov, 2011

5 commits

  • Count of selector voltage is required for regulator_set_voltage
    to work via set_voltage_sel. VDD1/2 currently have it as zero,
    so regulator_set_voltage won't work for VDD1/2.
    Update count (n_voltages) for VDD1/2.

    Output Voltage = (step value * 12.5 mV + 562.5 mV) * gain

    With above expr, number of voltages that can be selected is
    step value count * gain count

    constant for gain count will be called VDD1_2_NUM_VOLT_COARSE

    existing constant for step value count is VDD1_2_NUM_VOLTS,
    use VDD1_2_NUM_VOLT_FINE instead to make clear that step value
    is not the only component in deciding selectable voltage count

    Signed-off-by: Afzal Mohammed
    Signed-off-by: Mark Brown

    Afzal Mohammed
     
  • Last piece of code using ANY_I2C_BUS was deleted almost 2 years ago,
    so ANY_I2C_BUS can go away as well.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
    if userspace passes in a large num_clips. The call to kmalloc would
    allocate a small buffer, and the call to fb->funcs->dirty may result
    in a memory corruption.

    Reported-by: Haogang Chen
    Signed-off-by: Xi Wang
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Xi Wang
     
  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: Revert pnfs ugliness from the generic NFS read code path
    SUNRPC: destroy freshly allocated transport in case of sockaddr init error
    NFS: Fix a regression in the referral code
    nfs: move nfs_file_operations declaration to bottom of file.c (try #2)
    nfs: when attempting to open a directory, fall back on normal lookup (try #5)

    Linus Torvalds
     
  • * 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: remove vm_dirties and task->dirties
    writeback: hard throttle 1000+ dd on a slow USB stick
    mm: Make task in balance_dirty_pages() killable

    Linus Torvalds
     

22 Nov, 2011

3 commits


21 Nov, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits)
    ipv4: fix redirect handling
    ping: dont increment ICMP_MIB_INERRORS
    sky2: fix hang in napi_disable
    sky2: enforce minimum ring size
    bonding: Don't allow mode change via sysfs with slaves present
    f_phonet: fix page offset of first received fragment
    stmmac: fix pm functions avoiding sleep on spinlock
    stmmac: remove spin_lock in stmmac_ioctl.
    stmmac: parameters auto-tuning through HW cap reg
    stmmac: fix advertising 1000Base capabilties for non GMII iface
    stmmac: use mdelay on timeout of sw reset
    sky2: version 1.30
    sky2: used fixed RSS key
    sky2: reduce default Tx ring size
    sky2: rename up/down functions
    sky2: pci posting issues
    sky2: fix hang on shutdown (and other irq issues)
    r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
    MAINTAINERS: change email address for shemminger
    pch_gbe: Move #include of module.h
    ...

    Linus Torvalds
     
  • * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM guest: prevent tracing recursion with kvmclock
    Revert "KVM: PPC: Add support for explicit HIOR setting"
    KVM: VMX: Check for automatic switch msr table overflow
    KVM: VMX: Add support for guest/host-only profiling
    KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
    KVM: s390: announce SYNC_MMU
    KVM: s390: Fix tprot locking
    KVM: s390: handle SIGP sense running intercepts
    KVM: s390: Fix RUNNING flag misinterpretation

    Linus Torvalds
     
  • * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / Suspend: Fix bug in suspend statistics update
    PM / Hibernate: Fix the early termination of test modes
    PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
    PM Sleep: Do not extend wakeup paths to devices with ignore_children set
    PM / driver core: disable device's runtime PM during shutdown
    PM / devfreq: correct Kconfig dependency
    PM / devfreq: fix use after free in devfreq_remove_device
    PM / shmobile: Avoid restoring the INTCS state during initialization
    PM / devfreq: Remove compiler error after irq.h update
    PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request()
    PM / Clocks: Only disable enabled clocks in pm_clk_suspend()
    ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix
    PM / shmobile: Don't skip debugging output in pd_power_up()

    Linus Torvalds
     

20 Nov, 2011

1 commit

  • This adds a new optional chunk to the CS ioctl that specifies optional flags
    to the CS parser. Why this is useful is explained below. Note that some regs
    no longer need the NOP relocation packet if this feature is enabled.
    Tested on r300g and r600g with this flag disabled and enabled.

    Assume there are two contexts sharing the same mipmapped tiled texture.
    One context wants to render into the first mipmap and the other one
    wants to render into the last mipmap. As you probably know, the hardware
    has a MACRO_SWITCH feature, which turns off macro tiling for small mipmaps,
    but that only applies to samplers.
    (at least on r300-r500, though later hardware likely behaves the same)

    So we want to just re-set the tiling flags before rendering (writing
    packets), right? ... No. The contexts run in parallel, so they may
    set the tiling flags simultaneously and then fire their command streams
    also simultaneously. The last one setting the flags wins, the other one
    loses.

    Another problem is when one context wants to render into the first and
    the last mipmap in one CS. Impossible. It must flush before changing
    tiling flags and do the rendering into the smaller mipmaps in another CS.

    Yet another problem is that writing copy_blit in userspace would be a mess
    involving re-setting tiling flags to please the kernel, and causing races
    with other contexts at the same time.

    The only way out of this is to send tiling flags with each CS, ideally
    with each relocation. But we already do that through the registers.
    So let's just use what we have in the registers.

    Signed-off-by: Marek Olšák
    Signed-off-by: Dave Airlie

    Marek Olšák
     

19 Nov, 2011

2 commits

  • Dummy, non-zero definitions for HPAGE_MASK and HPAGE_SIZE were added in
    51c6f666fceb ("mm: ZAP_BLOCK causes redundant work") to avoid a divide
    by zero in generic kernel code.

    That code has since been removed, but probably should never have been
    added in the first place: we don't want HPAGE_SIZE to act like PAGE_SIZE
    for code that is working with hugepages, for example, when the
    dependency on CONFIG_HUGETLB_PAGE has not been fulfilled.

    Because hugepage size can differ from architecture to architecture, each
    is required to have their own definitions for both HPAGE_MASK and
    HPAGE_SIZE. This is always done in arch/*/include/asm/page.h.

    So, just remove the dummy and dangerous definitions since they are no
    longer needed and reveals the correct dependencies. Tested on
    architectures using the definitions with allyesconfig: x86 (even with
    thp), hppa, mips, powerpc, s390, sh3, sh4, sparc, and sparc64, and with
    defconfig on ia64.

    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    new helper: mount_subtree()
    switch create_mnt_ns() to saner calling conventions, fix double mntput() in nfs
    btrfs: fix double mntput() in mount_subvol()

    Linus Torvalds
     

18 Nov, 2011

3 commits

  • …kernel/git/konrad/xen

    * 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen-gntalloc: signedness bug in add_grefs()
    xen-gntalloc: integer overflow in gntalloc_ioctl_alloc()
    xen-gntdev: integer overflow in gntdev_alloc_map()
    xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs.
    xen/balloon: Avoid OOM when requesting highmem
    xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI
    xen: map foreign pages for shared rings by updating the PTEs directly

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-block:
    block: add missed trace_block_plug
    paride: fix potential information leak in pg_read()
    bio: change some signed vars to unsigned
    block: avoid unnecessary plug list flush
    cciss: auto engage SCSI mid layer at driver load time
    loop: cleanup set_status interface
    include/linux/bio.h: use a static inline function for bio_integrity_clone()
    loop: prevent information leak after failed read
    block: Always check length of all iov entries in blk_rq_map_user_iov()
    The Windows driver .inf disables ASPM on all cciss devices. Do the same.
    backing-dev: ensure wakeup_timer is deleted
    block: Revert "[SCSI] genhd: add a new attribute "alias" in gendisk"

    Linus Torvalds
     
  • Commit 4ca46ff3e0d8c234cb40ebb6457653b59584426c (PM / Sleep: Mark
    devices involved in wakeup signaling during suspend) introduced
    the power.wakeup_path field in struct dev_pm_info to mark devices
    whose children are enabled to wake up the system from sleep states,
    so that power domains containing the parents that provide their
    children with wakeup power and/or relay their wakeup signals are not
    turned off. Unfortunately, that introduced a PM regression on SH7372
    whose power consumption in the system "memory sleep" state increased
    as a result of it, because it prevented the power domain containing
    the I2C controller from being turned off when some children of that
    controller were enabled to wake up the system, although the
    controller was not necessary for them to signal wakeup.

    To fix this issue use the observation that devices whose
    power.ignore_children flag is set for runtime PM should be treated
    analogously during system suspend. Namely, they shouldn't be
    included in wakeup paths going through their children. Since the
    SH7372 I2C controller's power.ignore_children flag is set, doing so
    will restore the previous behavior of that SOC.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

17 Nov, 2011

5 commits


16 Nov, 2011

7 commits

  • This is just a cleanup patch to silence a static checker warning.

    The problem is that we cap "nr_iovecs" so it can't be larger than
    "UIO_MAXIOV" but we don't check for negative values. It turns out this is
    prevented at other layers, but logically it doesn't make sense to have
    negative nr_iovecs so making it unsigned is nicer.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Dan Carpenter
     
  • When CONFIG_BLK_DEV_INTEGRITY is not set, we get these warnings:

    drivers/md/dm.c: In function 'split_bvec':
    drivers/md/dm.c:1061:3: warning: statement with no effect
    drivers/md/dm.c: In function 'clone_bio':
    drivers/md/dm.c:1088:3: warning: statement with no effect

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Stephen Rothwell
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon/kms: fix segfault in pm rework
    drm/radeon/kms: fix up gpio i2c mask bits for r4xx
    drm/radeon: add some missing FireMV pci ids
    vgaarb: a NULL bridge is acceptable for root devices.
    drm: Remove utterly bogus preempt_disable() sections

    Linus Torvalds
     
  • The crisv10.c and the atmel_serial.c serial drivers intepret the fields of the
    serial_rs485 structure in a different way.

    In particular, crisv10.c uses SER_RS485_RTS_AFTER_SEND and
    SER_RS485_RTS_ON_SEND for the voltage of the RTS pin; atmel_serial.c,
    instead, uses these values to know if a delay must be set before and
    after sending. This patch makes the usage of these variables consistent
    across all drivers and fixes the Documentation as well.

    From now on, SER_RS485_RTS_AFTER_SEND and SER_RS485_RTS_ON_SEND will be
    used to set the voltage of the RTS pin (as in the crisv10.c driver); the
    delay will be understood by looking only at the value of
    delay_rts_before_send and delay_rts_after_send.

    Signed-off-by: Claudio Scordino
    Signed-off-by: Darron Black
    Acked-by: Jesper Nilsson
    Acked-by: Nicolas Ferre
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Claudio Scordino
     
  • Noticed by Egbert.

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Cc: Egbert Eich
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Fix warning of make xmldocs of documention of the struct member iommu_ops from struct bus_type.

    Signed-off-by: Marcos Paulo de Souza
    Acked-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman

    Marcos Paulo de Souza
     
  • * 'fixes' of git://git.linaro.org/people/triad/linux-pinctrl:
    pinctrl: hide subsystem from the populace
    pinctrl: fix "warning: 'struct pinctrl_dev' declared inside parameter list"

    Linus Torvalds
     

14 Nov, 2011

3 commits

  • * 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh:
    ARM: mach-shmobile: cpuidle single/global and last_state fixes
    ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h
    ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h
    ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h
    ARM: mach-shmobile: ap4evb: remove white space from end of line
    ARM: mach-shmobile: clock-sh7372: remove un-necessary index
    ARM: mach-shmobile: kota2: add comment out separator
    ARM: mach-shmobile: sh73a0: add MMC data pin pull-up

    Linus Torvalds
     
  • * 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh:
    mailmap: Fix up some renesas attributions
    sh: clkfwk: Kill off remaining debugfs cruft.
    drivers: sh: Kill off dead pathname for runtime PM stub.
    drivers: sh: Generalize runtime PM platform stub.
    sh: Wire up process_vm syscalls.
    sh: clkfwk: add clk_rate_mult_range_round()
    serial: sh-sci: Fix up SH-2A SCIF support.
    sh: Fix cached/uncaced address calculation in 29bit mode

    Linus Torvalds
     
  • commit 3ceca749668a52bd795585e0f71c6f0b04814f7b added a TOS attribute.

    Unfortunately TOS and TCLASS are both present in a dual-stack v6 socket,
    furthermore they can have different values. As such one cannot in a
    sane way expose both through a single attribute.

    Signed-off-by: Maciej Żenczyowski
    CC: Murali Raja
    CC: Stephen Hemminger
    CC: Eric Dumazet
    CC: David S. Miller
    Signed-off-by: David S. Miller

    Maciej Żenczykowski
     

12 Nov, 2011

1 commit