20 May, 2011

1 commit

  • …l/git/tip/linux-2.6-tip

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    hrtimer: Make lookup table const
    RTC: Disable CONFIG_RTC_CLASS from being built as a module
    timers: Fix alarmtimer build issues when CONFIG_RTC_CLASS=n
    timers: Remove delayed irqwork from alarmtimers implementation
    timers: Improve alarmtimer comments and minor fixes
    timers: Posix interface for alarm-timers
    timers: Introduce in-kernel alarm-timer interface
    timers: Add rb_init_node() to allow for stack allocated rb nodes
    time: Add timekeeping_inject_sleeptime

    Linus Torvalds
     

17 May, 2011

1 commit

  • …el/git/tip/linux-2.6-tip

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    tick: Clear broadcast active bit when switching to oneshot
    rtc: mc13xxx: Don't call rtc_device_register while holding lock
    rtc: rp5c01: Initialize drvdata before registering device
    rtc: pcap: Initialize drvdata before registering device
    rtc: msm6242: Initialize drvdata before registering device
    rtc: max8998: Initialize drvdata before registering device
    rtc: max8925: Initialize drvdata before registering device
    rtc: m41t80: Initialize clientdata before registering device
    rtc: ds1286: Initialize drvdata before registering device
    rtc: ep93xx: Initialize drvdata before registering device
    rtc: davinci: Initialize drvdata before registering device
    rtc: mxc: Initialize drvdata before registering device
    clocksource: Install completely before selecting

    Linus Torvalds
     

12 May, 2011

1 commit

  • The driver is not balancing set_irq and disable_irq_wake() calls, so
    ensure that it keeps track of whether the wake is enabled.

    The fixes the following error on S3C6410 devices:

    WARNING: at kernel/irq/manage.c:382 set_irq_wake+0x84/0xec()
    Unbalanced IRQ 92 wake disable

    Signed-off-by: Ben Dooks
    Signed-off-by: Mark Brown
    Cc: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

07 May, 2011

11 commits

  • Since commit f44f7f9 (RTC: Initialize kernel state from RTC)
    rtc_device_register reads the programmed alarm. As reading the alarm
    needs to take the mc13xxx lock, release it before calling
    rtc_device_register.

    This fixes a deadlock during boot:

    INFO: task swapper:1 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    swapper D c02b175c 0 1 0 0x00000000
    [] (schedule+0x304/0x4f4) from [] (__mutex_lock_slowpath+0x7c/0x110)
    [] (__mutex_lock_slowpath+0x7c/0x110) from [] (mc13xxx_rtc_read_time+0x1c/0x118)
    [] (mc13xxx_rtc_read_time+0x1c/0x118) from [] (__rtc_read_time+0x58/0x5c)
    [] (__rtc_read_time+0x58/0x5c) from [] (rtc_read_time+0x30/0x48)
    [] (rtc_read_time+0x30/0x48) from [] (__rtc_read_alarm+0x1c/0x290)
    [] (__rtc_read_alarm+0x1c/0x290) from [] (rtc_device_register+0x150/0x27c)
    [] (rtc_device_register+0x150/0x27c) from [] (mc13xxx_rtc_probe+0x128/0x17c)
    [] (mc13xxx_rtc_probe+0x128/0x17c) from [] (platform_drv_probe+0x1c/0x24)
    [] (platform_drv_probe+0x1c/0x24) from [] (driver_probe_device+0x80/0x1a8)
    [] (driver_probe_device+0x80/0x1a8) from [] (__driver_attach+0x8c/0x90)
    [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x60/0x8c)
    [] (bus_for_each_dev+0x60/0x8c) from [] (bus_add_driver+0x180/0x248)
    [] (bus_add_driver+0x180/0x248) from [] (driver_register+0x70/0x15c)
    [] (driver_register+0x70/0x15c) from [] (platform_driver_probe+0x18/0x98)
    [] (platform_driver_probe+0x18/0x98) from [] (do_one_initcall+0x2c/0x168)
    [] (do_one_initcall+0x2c/0x168) from [] (kernel_init+0xa0/0x150)
    [] (kernel_init+0xa0/0x150) from [] (kernel_thread_exit+0x0/0x8)

    Reported-by: Vagrant Cascadian
    Signed-off-by: Uwe Kleine-König
    Closes: http://bugs.debian.org/625804
    [Tweaked commit log -jstultz]
    Signed-off-by: John Stultz

    Uwe Kleine-König
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the clientdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the clientdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Wolfram Sang
    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Wolfram Sang
    [Fixed up commit log -jstultz]
    Signed-off-by: John Stultz

    Wolfram Sang
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Wolfram Sang
    [fixed up commit log -jstultz]
    Signed-off-by: John Stultz

    Wolfram Sang
     
  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
    an issue in a number of RTC drivers, where the drivers call
    rtc_device_register before initializing the device or platform drvdata.

    This frequently results in null pointer dereferences when the
    rtc_device_register immediately makes use of the rtc device, calling
    rtc_read_alarm.

    The solution is to ensure the drvdata is initialized prior to registering
    the rtc device.

    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Wolfram Sang
    [fixed up commit log -jstultz]
    Signed-off-by: John Stultz

    Wolfram Sang
     

03 May, 2011

2 commits


28 Apr, 2011

1 commit

  • We call rtc_read_alarm from rtc_device_register, so it is important
    that the rtc device is fully initialized prior to registration.

    rtc-max8925 sets drvdata after register, so the rtc_read_alarm code
    dereferences a NULL pointer.

    Call dev_set_drvdata before rtc_device_register.

    [ jstultz/tglx: Massaged commit message ]

    Signed-off-by: Zhangfei Gao
    Cc: Alessandro Zummo
    Link: http://lkml.kernel.org/r/%3C1303929869-25249-1-git-send-email-john.stultz%40linaro.org%3E
    Signed-off-by: John Stultz
    Signed-off-by: Thomas Gleixner

    Zhangfei Gao
     

27 Apr, 2011

1 commit

  • Some platforms cannot implement read_persistent_clock, as
    their RTC devices are only accessible when interrupts are enabled.
    This keeps them from being used by the timekeeping code on resume
    to measure the time in suspend.

    The RTC layer tries to work around this, by calling do_settimeofday
    on resume after irqs are reenabled to set the time properly. However,
    this only corrects CLOCK_REALTIME, and does not properly adjust
    the sleep time value. This causes btime in /proc/stat to be incorrect
    as well as making the new CLOCK_BOTTTIME inaccurate.

    This patch resolves the issue by introducing a new timekeeping hook
    to allow the RTC layer to inject the sleep time on resume.

    The code also checks to make sure that read_persistent_clock is
    nonfunctional before setting the sleep time, so that should the RTC's
    HCTOSYS option be configured in on a system that does support
    read_persistent_clock we will not increase the total_sleep_time twice.

    CC: Arve Hjønnevåg
    CC: Thomas Gleixner
    Acked-by: Arnd Bergmann
    Signed-off-by: John Stultz

    John Stultz
     

26 Apr, 2011

1 commit


21 Apr, 2011

1 commit

  • The rtc_device_register() call has changed semantics so that it
    will immediately call out to rtc_read_alarm() and since the
    callbacks require the drvdata to be set, we need to set it before
    the registration call to avoid NULL dereference.

    Signed-off-by: Linus Walleij

    Linus Walleij
     

18 Apr, 2011

1 commit

  • In omap_rtc_probe error path, free_irq() was using NULL rather than the
    driver data as the data pointer so free_irq() wouldn't have matched.

    Signed-off-by: Axel Lin
    Cc: "George G. Davis"
    Cc: Alessandro Zummo
    Cc: rtc-linux@googlegroups.com
    Link: http://lkml.kernel.org/r/%3C1303005778.2889.2.camel%40phoenix%3E
    Signed-off-by: Thomas Gleixner

    Axel Lin
     

17 Apr, 2011

1 commit

  • …linus', 'timer-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf_event: Fix cgrp event scheduling bug in perf_enable_on_exec()
    perf: Fix a build error with some GCC versions

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix erroneous all_pinned logic
    sched: Fix sched-domain avg_load calculation

    * 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    RTC: rtc-mrst: follow on to the change of rtc_device_register()
    RTC: add missing "return 0" in new alarm func for rtc-bfin.c
    RTC: Fix s3c compile error due to missing s3c_rtc_setpie
    RTC: Fix early irqs caused by calling rtc_set_alarm too early

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, amd: Disable GartTlbWlkErr when BIOS forgets it
    x86, NUMA: Fix fakenuma boot failure
    x86/mrst: Fix boot crash caused by incorrect pin to irq mapping
    x86/ce4100: Add reg property to bridges

    Linus Torvalds
     

15 Apr, 2011

1 commit


13 Apr, 2011

1 commit


08 Apr, 2011

2 commits

  • …-linus', 'irq-fixes-for-linus' and 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86-32, fpu: Fix FPU exception handling on non-SSE systems
    x86, hibernate: Initialize mmu_cr4_features during boot
    x86-32, NUMA: Fix ACPI NUMA init broken by recent x86-64 change
    x86: visws: Fixup irq overhaul fallout

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Clean up rebalance_domains() load-balance interval calculation

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86/mrst/vrtc: Fix boot crash in mrst_rtc_init()
    rtc, x86/mrst/vrtc: Fix boot crash in rtc_read_alarm()

    * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    genirq: Fix cpumask leak in __setup_irq()

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf probe: Fix listing incorrect line number with inline function
    perf probe: Fix to find recursively inlined function
    perf probe: Fix multiple --vars options behavior
    perf probe: Fix to remove redundant close
    perf probe: Fix to ensure function declared file

    Linus Torvalds
     
  • * 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
    Fix common misspellings

    Linus Torvalds
     

07 Apr, 2011

2 commits

  • Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") caused a
    boot regression on the MRST platform.

    The reason is that rtc_device_register() calls rtc_read_alarm() after
    that change, which function does not have all driver data set up yet.

    The rtc-mrst driver needs to call dev_set_drvdata() before rtc_device_register()
    gets called.

    Signed-off-by: Feng Tang
    Signed-off-by: Alan Cox
    Acked-by: John Stultz
    Cc: Alessandro Zummo
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/1302140384-27571-1-git-send-email-feng.tang@intel.com
    Signed-off-by: Ingo Molnar

    Feng Tang
     
  • commit f44f7f96a20 (RTC: Initialize kernel state from RTC) will
    call rtc_read_alarm() inside rtc_device_register(), so rtc-mrst
    driver need to call dev_set_drvdata() before rtc_device_register()
    get called.

    Cc: Alessandro Zummo
    Cc: John Stultz
    Cc: Thomas Gleixner
    Signed-off-by: Feng Tang
    Signed-off-by: John Stultz

    Feng Tang
     

04 Apr, 2011

1 commit

  • Fix the following section mismatch warning.

    WARNING: drivers/rtc/built-in.o(.data+0xa0): Section mismatch in reference from the variable vrtc_mrst_platform_driver to the function .init.text:vrtc_mrst_platform_probe()
    The variable vrtc_mrst_platform_driver references the function __init vrtc_mrst_platform_probe()
    If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Major Lee
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Major Lee
     

31 Mar, 2011

1 commit


30 Mar, 2011

3 commits

  • The new bfin_rtc_alarm_irq_enable function forgot to add a "return 0" to
    the end leading to the build warning:
    drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
    drivers/rtc/rtc-bfin.c:253: warning: control reaches end of non-void function

    CC: stable@kernel.org
    CC: Thomas Gleixner
    CC: Alessandro Zummo
    Signed-off-by: Mike Frysinger
    Signed-off-by: John Stultz

    Mike Frysinger
     
  • s3c_rtc_setpie was removed, and it resulted in compiler error:

    drivers/rtc/rtc-s3c.c: In function s3c_rtc_release
    drivers/rtc/rtc-s3c.c:339:2: error: implicit declaration of function
    s3c_rtc_setpie

    Fix it by removing s3c_rtc_release calls.

    [jstultz: An identical fix was also sent in by Jiri Pinkava
    ]

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    Signed-off-by: Vasily Khoruzhick
    Signed-off-by: John Stultz

    Vasily Khoruzhick
     
  • When we register an rtc device at boot, we read the alarm value
    in hardware and set the rtc device's aie_timer to that value.

    The initial method to do this was to simply call rtc_set_alarm()
    with the value read from hardware. However, this may cause problems
    as rtc_set_alarm may enable interupts, and the RTC alarm might fire,
    which can cause invalid pointer dereferencing since the RTC registration
    is not complete.

    This patch solves the issue by initializing the rtc_device.aie_timer
    y hand via rtc_initialize_alarm(). This avoids any calls to the RTC
    hardware which might enable interrupts too early.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    Reported-by: Konrad Rzeszutek Wilk
    Tested-by: Konrad Rzeszutek Wilk
    Signed-off-by: John Stultz

    John Stultz
     

29 Mar, 2011

1 commit


23 Mar, 2011

4 commits


21 Mar, 2011

1 commit

  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
    video: change to new flag variable
    scsi: change to new flag variable
    rtc: change to new flag variable
    rapidio: change to new flag variable
    pps: change to new flag variable
    net: change to new flag variable
    misc: change to new flag variable
    message: change to new flag variable
    memstick: change to new flag variable
    isdn: change to new flag variable
    ieee802154: change to new flag variable
    ide: change to new flag variable
    hwmon: change to new flag variable
    dma: change to new flag variable
    char: change to new flag variable
    fs: change to new flag variable
    xtensa: change to new flag variable
    um: change to new flag variables
    s390: change to new flag variable
    mips: change to new flag variable
    ...

    Fix up trivial conflict in drivers/hwmon/Makefile

    Linus Torvalds
     

19 Mar, 2011

1 commit

  • * 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
    spi/dw_spi: move dw_spi.h into drivers/spi
    spi/dw_spi: Fix missing header
    gpio/langwell: Clear edge bit before handling
    gpio/langwell: Simplify demux loop
    gpio/langwell: Convert irq name space
    gpio/langwell: Fix broken irq_eoi change.
    gpio; Make Intel chipset gpio drivers depend on x86
    gpio/cs5535-gpio: Fix section mismatch
    spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
    spi/davinci: Support DMA transfers larger than 65535 words
    spi/davinci: Use correct length parameter to dma_map_single calls
    gpio: Use __devexit at necessary places
    gpio: add MODULE_DEVICE_TABLE to pch_gpio and ml_ioh_gpio
    gpio/mcp23s08: support mcp23s17 variant
    of_mmc_spi: add card detect irq support
    spi/omap_mcspi: catch xfers of non-multiple SPI word size
    spi/omap_mcspi: Off-by-one error in finding the right divisor
    gpio/pca953x: Fix wrong pointer type
    spi/pl022: rid dangling labels
    spi: add support for SuperH SPI
    ...

    Linus Torvalds