09 Jan, 2012

5 commits

  • Add PFC support for a 32-bit unlock register. Needed to
    drive the r8a7779 PFC that comes with a funky PMMR register.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Add support for variable config reg hardware by adding
    the macro PINMUX_CFG_REG_VAR(). The width of each bitfield
    needs to be passed to the macro, and the correct space must
    be consumed by each bitfield in the enum table following the
    macro. Data registers still need to have fixed bitfields.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Add a helper function for shared config reg access
    calculations. This allows us to reduce the amount
    of duplicated code, and at the same time prepare
    for a common place for future variable bitwidth
    config reg support.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Update the way the PFC code is passing bitfield
    selection between configure register functions.

    Convert the code from using index only to bitfield
    number and selected value. First step towards future
    variable bitfield width support.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Introduce gpio_read_bit() for data register read access
    and modify sh_gpio_get_value() to make use of the new
    function instead of gpio_read_reg(). The purpose of
    this change is to update the code to only use the
    gpio_read_reg() function for config register access.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

09 Dec, 2011

1 commit

  • Add support for non-entity mapped PFC registers through
    the use of struct resource and ioremap()/iounmap().

    The PFC main data structure gets updated with a pointer
    to a struct resources array that point out all register
    windows used by the PFC instance. The register definitions
    are kept as physical addresses but the PFC code will do
    transparent conversion into virtual addresses whenever
    register windows are specified using with struct resource.

    To introduce as little performance penalty as possible the
    virtual address of each data register is cached in memory.
    The virtual address of each configuration register is however
    calculated during run time. This because the configuration
    is considered slow path so focus is instead put on keeping
    memory foot print as small as possible.

    The PFC register access code is in this patch updated from
    __raw_readN() / __raw_writeN() into ioreadN() / iowriteN().

    This patch is needed to support the PFC block in r8a7779.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

30 Nov, 2011

1 commit


29 Nov, 2011

12 commits


28 Nov, 2011

6 commits

  • * 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung:
    drm/exynos: fixed wrong err ptr usage and destroy call in exeception
    drm/exynos: Add disable of manager
    drm/exynos: include linux/module.h
    drm/exynos: fix vblank bug.
    drm/exynos: changed buffer structure.
    drm/exynos: removed unnecessary variable.
    drm/exynos: use gem create function generically
    drm/exynos: checked for null pointer
    drm/exynos: added crtc dpms for disable crtc
    drm/exynos: removed meaningless parameter from fbdev update
    drm/exynos: restored kernel_fb_list when reiniting fb_helper
    drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
    drm/exynos: added manager object to connector
    drm/exynos: fixed converting between display mode and timing
    drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
    drm/exynos: added kms poll for handling hpd event

    Dave Airlie
     
  • * 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6:
    viafb: correct sync polarity for OLPC DCON
    video:da8xx-fb: Disable and reset sequence on version2 of LCDC
    OMAPDSS: DISPC: skip scaling calculations when not scaling
    OMAPFB: fix compilation warnings due to missing include
    OMAPDSS: HDMI: fix returned HDMI pixel clock

    Linus Torvalds
     
  • Revert a hunk in drivers/net/wireless/ath/ath9k/hw.c introduced by
    commit 2577c6e8f232 ("ath9k_hw: Add support for AR946/8x chipsets") that
    caused a nasty regression to appear on my Acer Ferrari One (the box
    locks up entirely at random times after the wireless has been started
    without any way to get debug information out of it).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Felix Fietkau
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Takashi Iwai
     
  • VT1708 has no support for unsolicited events per jack-plug, the driver
    implements the workq for polling the jack-detection. The mixer element
    "Jack Detect" was supposed to control this behavior on/off, but this
    doesn't work properly as is now. The workq is always started and the
    HP automute is always enabled.

    This patch fixes the jack-detect control behavior by triggering / stopping
    the work appropriately at the state change. Also the work checks the
    internal state to continue scheduling or not.

    Cc: [v3.1]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The CS420X_IMAC27 was copied from the line before but CS420X_APPLE
    was clearly intented.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Takashi Iwai

    Dan Carpenter
     

27 Nov, 2011

3 commits

  • Fix build failure in staging iio driver:

    .../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd':
    .../drivers/staging/iio/industrialio-core.c:262:32: error:
    'ev_int' undeclared (first use in this function)

    Also convert the rest of the function to use the new variable.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/44x: Add mtd ndfc to the ppx44x defconfig
    powerpc: Fix compiliation with hugetlbfs enabled
    arch/powerpc/sysdev/ehv_pic.c: add missing kfree
    powerpc/fsl-lbc: Fix for fsl_upm
    drivers/edac/mpc85xx_edac.c: fix memory controller compatible for edac
    powerpc/qe: Fixup QE_General4 errata
    powerpc/85xx: Fix compile error on p3060_qds.c
    powerpc/p3060qds: Fix select of 'MPC8xxx_GPIO'
    powerpc/p1023: set IRQ[4:6,11] to active-high level sensitive for PCIe

    Linus Torvalds
     
  • This patch converts the drivers in drivers/hwmon/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Donggeun Kim
    Cc: Simon Guinot
    Cc: Lars-Peter Clausen
    Cc: MyungJoo Ham
    Cc: Ben Dooks
    Cc: Hans de Goede
    Cc: J Keerthy
    Cc: David S. Miller
    Cc: Mark Brown
    Signed-off-by: Axel Lin
    Acked-by: Mark Brown
    Signed-off-by: Guenter Roeck

    Axel Lin
     

26 Nov, 2011

2 commits


25 Nov, 2011

5 commits

  • In ancient times it was necessary to manually initialize the bus field of an
    spi_driver to spi_bus_type. These days this is done in spi_register_driver(),
    so we can drop the manual assignment.

    The patch was generated using the following coccinelle semantic patch:
    //
    @@
    identifier _driver;
    @@
    struct spi_driver _driver = {
    .driver = {
    - .bus = &spi_bus_type,
    },
    };
    //

    Signed-off-by: Lars-Peter Clausen
    Cc: Jean Delvare
    Cc: Guenter Roeck
    Cc: lm-sensors@lm-sensors.org
    Signed-off-by: Guenter Roeck

    Lars-Peter Clausen
     
  • ext4_end_io_dio() queues io_end->work and then clears iocb->private;
    however, io_end->work calls aio_complete() which frees the iocb
    object. If that slab object gets reallocated, then ext4_end_io_dio()
    can end up clearing someone else's iocb->private, this use-after-free
    can cause a leak of a struct ext4_io_end_t structure.

    Detected and tested with slab poisoning.

    [ Note: Can also reproduce using 12 fio's against 12 file systems with the
    following configuration file:

    [global]
    direct=1
    ioengine=libaio
    iodepth=1
    bs=4k
    ba=4k
    size=128m

    [create]
    filename=${TESTDIR}
    rw=write

    -- tytso ]

    Google-Bug-Id: 5354697
    Signed-off-by: Tejun Heo
    Signed-off-by: "Theodore Ts'o"
    Reported-by: Kent Overstreet
    Tested-by: Kent Overstreet
    Cc: stable@kernel.org

    Tejun Heo
     
  • Signed-off-by: Tony Breeds
    Acked-by: Josh Boyer
    Signed-off-by: Benjamin Herrenschmidt

    Tony Breeds
     
  • arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages':
    arch/powerpc/mm/hugetlbpage.c:312:2: error: implicit declaration of function 'parse_args'

    Signed-off-by: Kumar Gala
    Signed-off-by: Benjamin Herrenschmidt

    Kumar Gala
     
  • 2d3cbf8b (cgroup_freezer: update_freezer_state() does incorrect state
    transitions) removed is_task_frozen_enough and replaced it with a simple
    frozen call. This, however, breaks freezing for a group with stopped tasks
    because those cannot be frozen and so the group remains in CGROUP_FREEZING
    state (update_if_frozen doesn't count stopped tasks) and never reaches
    CGROUP_FROZEN.

    Let's add is_task_frozen_enough back and use it at the original locations
    (update_if_frozen and try_to_freeze_cgroup). Semantically we consider
    stopped tasks as frozen enough so we should consider both cases when
    testing frozen tasks.

    Testcase:
    mkdir /dev/freezer
    mount -t cgroup -o freezer none /dev/freezer
    mkdir /dev/freezer/foo
    sleep 1h &
    pid=$!
    kill -STOP $pid
    echo $pid > /dev/freezer/foo/tasks
    echo FROZEN > /dev/freezer/foo/freezer.state
    while true
    do
    cat /dev/freezer/foo/freezer.state
    [ "`cat /dev/freezer/foo/freezer.state`" = "FROZEN" ] && break
    sleep 1
    done
    echo OK

    Signed-off-by: Michal Hocko
    Acked-by: Li Zefan
    Cc: Tomasz Buchert
    Cc: Paul Menage
    Cc: Andrew Morton
    Cc: stable@kernel.org
    Signed-off-by: Tejun Heo

    Michal Hocko
     

24 Nov, 2011

5 commits

  • At this point, ehv_pic has been allocated but not stored anywhere, so it
    should be freed before leaving the function.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @exists@
    local idexpression x;
    statement S,S1;
    expression E;
    identifier fl;
    expression *ptr != NULL;
    @@

    x = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    when any
    when != true x == NULL
    x->fl
    ...>
    (
    if (x == NULL) S1
    |
    if (...) { ... when != x
    when forall
    (
    return \(0\|\|ptr\);
    |
    * return ...;
    )
    }
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Julia Lawall
     
  • If Freescale LBC driver fails to initialise itself from device tree, then
    internal structure is freed only but not NULL-fied. As result functions
    fsl_lbc_find() after checking the structure is not NULL are trying to
    access device registers.

    Signed-off-by: Alexandre Rusev
    Signed-off-by: Kumar Gala

    Alexandre Rusev
     
  • compatible in dts has been changed, so the driver needs to be updated
    accordingly.

    Signed-off-by: Shaohui Xie
    Cc: Grant Likely
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Kumar Gala

    Shaohui Xie
     
  • QE_General4 should only round up the divisor iff divisor is > 3.
    Rounding up lower divisors makes the error too big, causing USB
    on MPC832x to fail.

    Signed-off-by: Joakim Tjernlund
    Acked-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Joakim Tjernlund
     
  • arch/powerpc/platforms/85xx/p3060_qds.c: In function '__machine_initcall_p3060_qds_declare_of_platform_devices':
    arch/powerpc/platforms/85xx/p3060_qds.c:73:1: error: implicit declaration of function 'declare_of_platform_devices'

    declare_of_platform_devices should have been corenet_ds_publish_devices.

    Signed-off-by: Kumar Gala

    Kumar Gala