14 Nov, 2011

4 commits

  • * '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
     
  • * git://github.com/rustyrussell/linux:
    virtio-pci: fix use after free

    Linus Torvalds
     
  • Commit 31a3ddda166cda86d2b5111e09ba4bda5239fae6 introduced
    a use after free in virtio-pci. The main issue is
    that the release method signals removal of the virtio device,
    while remove signals removal of the pci device.

    For example, on driver removal or hot-unplug,
    virtio_pci_release_dev is called before virtio_pci_remove.
    We then might get a crash as virtio_pci_remove tries to use the
    device freed by virtio_pci_release_dev.

    We allocate/free all resources together with the
    pci device, so we can leave the release method empty.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Amit Shah
    Signed-off-by: Rusty Russell
    Cc: stable@kernel.org

    Michael S. Tsirkin
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon/kms/combios: fix dynamic allocation of PM clock modes

    Linus Torvalds
     

13 Nov, 2011

2 commits

  • After commit e978aa7d7d57 ("cpuidle: Move dev->last_residency update to
    driver enter routine; remove dev->last_state") setting acpi_idle_suspend
    to 1 by acpi_processor_suspend() causes the ACPI cpuidle routines to
    return error codes continuously, which in turn causes cpuidle to lock up
    (hard).

    However, acpi_idle_suspend doesn't appear to be useful for any
    particular purpose (it's racy and doesn't really provide any real
    protection), so it can be removed, which makes the problem go away.

    Reported-and-tested-by: Tomas M.
    Reported-and-tested-by: Ferenc Wagner
    Tested-by: Arnd Bergmann
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • I missed the combios path when I updated the atombios pm code.

    Reported by amarsh04 on IRC.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     

12 Nov, 2011

9 commits

  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm/imx: fix imx6q mmc error when mounting rootfs
    arm/imx: fix AUTO_ZRELADDR selection
    arm/imx: fix the references to ARCH_MX3
    ARM: mx51/53: set pwm clock parent to ipg_perclk
    arm/tegra: enable headphone detection gpio on seaboard
    arm/dt: Fix ventana SDHCI power-gpios
    arm/tegra: Don't create duplicate gpio and pinmux devices
    ARM: at91: Fix USBA gadget registration
    atmel/spi: fix missing probe
    at91/yl-9200: Fix section mismatch
    at91: vmalloc fix missing AT91_VIRT_BASE define
    ARM: at91: usart: drop static map regs for dbgu
    ARM: picoxcell: add extra temp register to addruart
    ARM: msm: fix compilation flags for MSM_SCM
    arm/mxs: fix mmc device adding for mach-mx28evk
    ARM: mxc: Remove test_for_ltirq
    ARM:i.MX: fix build error in clock-mx51-mx53.c
    ARM:i.MX: fix build error in tzic/avic.c
    ARM: mxc: fix local timer interrupt handling
    msm: boards: Fix fallout from removal of machine_desc in fixup

    Linus Torvalds
     
  • The variable i is removed by commit ded8433
    "[CPUFREQ] db8500: remove unneeded for loop iteration over freq_table",
    but current code to print available frequencies still uses the i variable.
    Thus add the i variable back to fix below buld error:

    CC drivers/cpufreq/db8500-cpufreq.o
    drivers/cpufreq/db8500-cpufreq.c: In function 'db8500_cpufreq_init':
    drivers/cpufreq/db8500-cpufreq.c:123: error: 'i' undeclared (first use in this function)
    drivers/cpufreq/db8500-cpufreq.c:123: error: (Each undeclared identifier is reported only once
    drivers/cpufreq/db8500-cpufreq.c:123: error: for each function it appears in.)
    make[2]: *** [drivers/cpufreq/db8500-cpufreq.o] Error 1
    make[1]: *** [drivers/cpufreq] Error 2
    make: *** [drivers] Error 2

    This patch also fixes using uninitialized i variable as array index.

    Signed-off-by: Axel Lin
    Acked-by: Linus Walleij
    Signed-off-by: Dave Jones

    Axel Lin
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (29 commits)
    m68k/mac: Remove mac_irq_{en,dis}able() wrappers
    m68k/irq: Remove obsolete support for user vector interrupt fixups
    m68k/irq: Remove obsolete m68k irq framework
    m68k/q40: Convert Q40/Q60 to genirq
    m68k/sun3: Convert Sun3/3x to genirq
    m68k/sun3: Use the kstat_irqs_cpu() wrapper
    m68k/apollo: Convert Apollo to genirq
    m68k/vme: Convert VME to genirq
    m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
    m68k/mac: Optimize interrupts using chain handlers
    m68k/mac: Convert Mac to genirq
    m68k/amiga: Optimize interrupts using chain handlers
    m68k/amiga: Convert Amiga to genirq
    m68k/amiga: Refactor amiints.c
    m68k/atari: Remove code and comments about different irq types
    m68k/atari: Convert Atari to genirq
    m68k/irq: Add genirq support
    m68k/irq: Remove obsolete IRQ_FLG_* users
    m68k/irq: Rename {,__}m68k_handle_int()
    m68k/irq: Add m68k_setup_irq_controller()
    ...

    Linus Torvalds
     
  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls
    [media] v4l2-event: Don't set sev->fh to NULL on unsubscribe
    [media] v4l2-event: Remove pending events from fh event queue when unsubscribing
    [media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
    [media] MAINTAINERS: add a maintainer for s5p-mfc driver
    [media] v4l: s5p-mfc: fix reported capabilities
    [media] media: vb2: reset queued list on REQBUFS(0) call
    [media] media: vb2: set buffer length correctly for all buffer types
    [media] media: vb2: add a check for uninitialized buffer
    [media] mxl111sf: fix build warning
    [media] mxl111sf: remove pointless if condition in mxl111sf_config_spi
    [media] mxl111sf: check for errors after mxl111sf_write_reg in mxl111sf_idac_config
    [media] mxl111sf: fix return value of mxl111sf_idac_config
    [media] uvcvideo: GET_RES should only be checked for BITMAP type menu controls

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/kvm: Fix build failure with HV KVM and CBE
    powerpc/ps3: Fix lv1_gpu_attribute hcall
    powerpc/ps3: Fix PS3 repository build warnings
    powerpc/ps3: irq: Remove IRQF_DISABLED
    powerpc/irq: Remove IRQF_DISABLED
    powerpc/numa: NUMA topology support for PowerNV
    powerpc: Add System RAM to /proc/iomem
    powerpc: Add KVM as module to defconfigs
    powerpc/kvm: Fix build with older toolchains
    powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.
    powerpc/5200: add support for charon board

    Linus Torvalds
     
  • Real world year equals the value in vrtc YEAR register plus an offset.
    We used 1960 as the offset to make leap year consistent, but for a
    device's first use, its YEAR register is 0 and the system year will
    be parsed as 1960 which is not a valid UNIX time and will cause many
    applications to fail mysteriously. So we use 1972 instead to fix this
    issue.

    Updated patch which adds a sanity check suggested by Mathias

    This isn't a change in behaviour for systems, because 1972 is the one we
    actually use. It's the old version in upstream which is out of sync with
    all devices.

    Signed-off-by: Feng Tang
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Feng Tang
     
  • * 'upstream-linus' of git://github.com/jgarzik/libata-dev:
    pata_of_platform: Don't use NO_IRQ
    [libata] ahci: Add ASMedia ASM1061 support
    [libata] Issue SRST to Sil3726 PMP
    sata_sis.c: trivial spelling fix
    ahci_platform: use dev_get_platdata()
    [libata] libata-scsi.c: Add function parameter documentation

    Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (42 commits)
    drm/radeon/kms/pm: switch to dynamically allocating clock mode array
    drm/radeon/kms: optimize r600_pm_profile_init
    drm/radeon/kms/pm: add a proper pm profile init function for fusion
    drm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks()
    drm/exynos: added padding to be 64-bit align.
    drm: fix kconfig unmet dependency warning
    drm: add some comments to drm_wait_vblank and drm_queue_vblank_event
    drm/radeon/benchmark: signedness bug in radeon_benchmark_move()
    drm: do not sleep on vblank while holding a mutex
    MAINTAINERS: exynos: Add EXYNOS DRM maintainer entry
    drm: try to restore previous CRTC config if mode set fails
    drm/radeon/kms: make an aux failure debug only
    drm: drop select of SLOW_WORK
    drm: serialize access to list of debugfs files
    drm/radeon/kms: fix use of vram scratch page on evergreen/ni
    drm/radeon: Make sure CS mutex is held across GPU reset.
    drm: Ensure string is null terminated.
    vmwgfx: Only allow 64x64 cursors
    vmwgfx: Initialize clip rect loop correctly in surface dirty
    vmwgfx: Close screen object system
    ...

    Linus Torvalds
     
  • Olof Johansson
     

11 Nov, 2011

25 commits

  • The following error is seen in some case when mounting rootfs from
    SD/MMC cards.

    Waiting for root device /dev/mmcblk0p1...
    mmc1: host does not support reading read-only switch. assuming write-enable.
    mmc1: new high speed SDHC card at address b368
    mmcblk0: mmc1:b368 SDC 3.74 GiB
    mmcblk0: p1
    mmc1: Timeout waiting for hardware interrupt.
    mmcblk0: error -110 transferring data, sector 3678224, nr 40, cmd response 0x900, card status 0xc00
    end_request: I/O error, dev mmcblk0, sector 3678225
    Buffer I/O error on device mmcblk0p1, logical block 458754
    lost page write due to I/O error on mmcblk0p1

    This patch fixes the problem by lowering the usdhc clock and correcting
    watermark configuration.

    Signed-off-by: Shawn Guo
    Cc: Chris Ball
    Cc: Sascha Hauer
    Signed-off-by: Sascha Hauer

    Shawn Guo
     
  • On newer chips the number of clock modes per power state varies.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Avoid a lot of extra loops through the pm state array.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • The new power tables need to be handled differently when setting
    up the profiles.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • It's already called via the DPMS functions.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Fix kconfig unmet dependency warning. BACKLIGHT_CLASS_DEVICE depends on
    BACKLIGHT_LCD_SUPPORT, so select the latter along with the former.

    warning: (DRM_RADEON_KMS && DRM_I915 && STUB_POULSBO && FB_BACKLIGHT && PANEL_SHARP_LS037V7DW01 && PANEL_ACX565AKM && USB_APPLEDISPLAY && FB_OLPC_DCON && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI && EEEPC_LAPTOP && ACPI_ASUS && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)

    Signed-off-by: Randy Dunlap
    Cc: David Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Randy Dunlap
     
  • * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
    drm/nouveau: Fix bandwidth calculation for DisplayPort
    drm/nouveau: by default use low bpp framebuffer on low memory cards
    drm/nv10: Change the BO size threshold determining the memory placement range.
    drm/nvc0: enable acceleration for nvc1 by default
    drm/nvc0/gr: fixup the mmio list register writes for 0xc1
    drm/nvc1: hacky workaround to fix accel issues
    drm/nvc0/gr: fix some bugs in grctx generation
    drm/nvc0: enable acceleration on 0xc8 by default
    drm/nvc0/vram: skip disabled PBFB subunits
    drm/nv40/pm: fix issues on igp chipsets, which don't have memory
    drm/nouveau: testing the wrong variable
    drm/nvc0/vram: storage type 0xc3 is not compressed
    drm/nv50: fix stability issue on NV86.
    drm/nouveau: initialize chan->fence.lock before use
    drm/nv50/vram: fix incorrect detection of bank count on newer chipsets
    drm/nv50/gr: typo fix, how about we not reset fifo during graph init?
    drm/nv50/bios: fixup mpll programming from the init table parser
    drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()
    drm: make sure drm_vblank_init() has been called before touching vbl_lock

    Dave Airlie
     
  • during the review of the fix for locks problems in drm_wait_vblank,
    a couple of false concerns were raised about how the drm_vblank_get
    and drm_vblank_put are used in this function; it turned out that the
    code is correct and that it cannot be simplified

    add a few comments to explain non-obvious flows in the code,
    to prevent "false alarms" in the future

    v2: incorporate comments received from Daniel Vetter

    Signed-off-by: Ilija Hadzic
    Reviewed-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Ilija Hadzic
     
  • radeon_benchmark_do_move() returns an int so "time" should be int
    too. Making it unsigned breaks the error handling.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Dave Airlie

    Dan Carpenter
     
  • drm_wait_vblank must be DRM_UNLOCKED because otherwise it
    will grab the drm_global_mutex and then go to sleep until the vblank
    event it is waiting for. That can wreck havoc in the windowing system
    because if one process issues this ioctl, it will block all other
    processes for the duration of all vblanks between the current and the
    one it is waiting for. In some cases it can block the entire windowing
    system.

    v2: incorporate comments received from Daniel Vetter and
    Michel Daenzer.

    v3/v4: after a lengty discussion with Daniel Vetter, it was concluded
    that the only thing not yet protected with locks and atomic
    ops is the write to dev->last_vblank_wait. It's only used in a
    debug file in proc, and the current code already employs no
    correct locking: the proc file only takes dev->struct_mutex,
    whereas drm_wait_vblank implicitly took the drm_global_mutex.
    Given all this, it's not worth bothering to try to fix
    the locks at this time.

    Signed-off-by: Ilija Hadzic
    Reviewed-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Ilija Hadzic
     
  • We restore the CRTC, encoder, and connector configurations, but if the
    mode set failed, the attached display may have been turned off, so we
    need to try set_config again to restore things to the way they were.

    Signed-off-by: Jesse Barnes
    Reviewed-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Jesse Barnes
     
  • Can happen when there is no DP panel attached, confusing
    users. Make it debug only.

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

    Alex Deucher
     
  • slow-work got killed in commit 181a51f6e0. This means that since v2.6.36
    there is no Kconfig symbol SLOW_WORK. Apparently selecting that symbol
    is a nop. Drop that select.

    Signed-off-by: Paul Bolle
    Signed-off-by: Dave Airlie

    Paul Bolle
     
  • Nouveau, when configured with debugfs, creates debugfs files for every
    channel, so structure holding list of files needs to be protected from
    simultaneous changes by multiple threads.

    Without this patch it's possible to hit kernel oops in
    drm_debugfs_remove_files just by running a couple of xterms with
    looped glxinfo.

    Signed-off-by: Marcin Slusarz
    Reviewed-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Marcin Slusarz
     
  • This hunk seems to have gotten lost when I rebased the patch.

    Reported-by: Sylvain Bertrand
    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • This was only the case if the GPU reset was triggered from the CS ioctl,
    otherwise other processes could happily enter the CS ioctl and wreak havoc
    during the GPU reset.

    This is a little complicated because the GPU reset can be triggered from the
    CS ioctl, in which case we're already holding the mutex, or from other call
    paths, in which case we need to lock the mutex. AFAICT the mutex API doesn't
    allow recursive locking or finding out the mutex owner, so we need to handle
    this with helper functions which allow recursive locking from the same
    process.

    Signed-off-by: Michel Dänzer
    Reviewed-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Michel Dänzer
     
  • Fixes Coverity buffer not null terminated defect.

    Signed-off-by: Vinson Lee
    Signed-off-by: Dave Airlie

    Vinson Lee
     
  • Snooping code expects this to be the case.

    Signed-off-by: Jakob Bornecrantz
    Reviewed-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Jakob Bornecrantz
     
  • Signed-off-by: Jakob Bornecrantz
    Reviewed-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Jakob Bornecrantz
     
  • Signed-off-by: Jakob Bornecrantz
    Reviewed-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Jakob Bornecrantz
     
  • Paul Mundt
     
  • Now that all of the named string association with clocks has been
    migrated to clkdev lookups there's no meaningful named topology that can
    be constructed for a debugfs tree view. Get rid of the left over bits,
    and shrink struct clk a bit in the process.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Signed-off-by: Paul Mundt

    Paul Mundt
     
  • The runtime PM platform support stub in use by ARM-based SH/R-Mobile
    platforms contains nothing that's specifically ARM-related and instead of
    wholly generic to anything using the clock framework.

    The recent runtime PM changes interact rather badly with the lazy
    disabling of clocks late in the boot process through the clock framework,
    leading to situations where the runtime suspend/resume paths are entered
    without a clock being actively driven due to having been lazily gated
    off.

    In order to correct this we can trivially tie in the aforementioned stub
    as a general fallback for all SH platforms that don't presently have
    their own runtime PM implementations (the corner case being SH-based
    SH-Mobile platforms, which have their own stub through the hwblk API --
    which in turn has bitrotted and will be subsequently adapted to use the
    same stub as everyone else), regardless of whether the platforms choose
    to define power domains of their own or not.

    This fixes up regressions for clock framework users who also build in
    runtime PM support without any specific power domains of their own, which
    was previously causing the serial console to be lost when warring with
    lazy clock disabling.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Drivers should not use NO_IRQ; moreover, some architectures don't
    have it nowadays. '0' is the 'no irq' case.

    Signed-off-by: Anton Vorontsov
    Acked-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Anton Vorontsov