07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

03 Nov, 2011

4 commits

  • Says Andrew:

    "60 patches. That's good enough for -rc1 I guess. I have quite a lot
    of detritus to be rechecked, work through maintainers, etc.

    - most of the remains of MM
    - rtc
    - various misc
    - cgroups
    - memcg
    - cpusets
    - procfs
    - ipc
    - rapidio
    - sysctl
    - pps
    - w1
    - drivers/misc
    - aio"

    * akpm: (60 commits)
    memcg: replace ss->id_lock with a rwlock
    aio: allocate kiocbs in batches
    drivers/misc/vmw_balloon.c: fix typo in code comment
    drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
    w1: disable irqs in critical section
    drivers/w1/w1_int.c: multiple masters used same init_name
    drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
    drivers/power/ds2780_battery.c: add a nolock function to w1 interface
    drivers/power/ds2780_battery.c: create central point for calling w1 interface
    w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it
    pps gpio client: add missing dependency
    pps: new client driver using GPIO
    pps: default echo function
    include/linux/dma-mapping.h: add dma_zalloc_coherent()
    sysctl: make CONFIG_SYSCTL_SYSCALL default to n
    sysctl: add support for poll()
    RapidIO: documentation update
    drivers/net/rionet.c: fix ethernet address macros for LE platforms
    RapidIO: fix potential null deref in rio_setup_device()
    RapidIO: add mport driver for Tsi721 bridge
    ...

    Linus Torvalds
     
  • The driver is added using platform_driver_probe(), so the callbacks can be
    discarded more aggessively.

    Signed-off-by: Uwe Kleine-König
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Add initial support for the microchip mcp7941x series of real time clocks.

    The mcp7941x series is generally compatible with the ds1307 and ds1337 rtc
    devices from dallas semiconductor. minor differences include a backup
    battery enable bit, and the polarity of the oscillator enable bit.

    Signed-off-by: David Anders
    Cc: Alessandro Zummo
    Reviewed-by: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Anders
     
  • This is the one use of an ida that doesn't retry on receiving -EAGAIN.
    I'm assuming do so will cause no harm and may help on a rare occasion.

    Signed-off-by: Jonathan Cameron
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Cameron
     

02 Nov, 2011

1 commit


01 Nov, 2011

1 commit


15 Sep, 2011

2 commits

  • The driver does not generate an alarm interrupt even though a time for
    an alarm is set.

    This results from disabling rtc_clk after setting the alarm time.

    To generate an alarm interrupt the driver should maintain its enabled
    state for rtc_clk the until alarm interrupt occurs. This patch permits
    generation of an alarm interrupt.

    [akpm@linux-foundation.org: make s3c_rtc_alarm_clk_lock local to s3c_rtc_alarm_clk_enable()]
    Signed-off-by: Donggeun Kim
    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Donggeun Kim
     
  • Include linux/sched.h to fix below build error.

    CC drivers/rtc/rtc-imxdi.o
    drivers/rtc/rtc-imxdi.c: In function 'di_write_wait':
    drivers/rtc/rtc-imxdi.c:168: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
    drivers/rtc/rtc-imxdi.c:168: error: (Each undeclared identifier is reported only once
    drivers/rtc/rtc-imxdi.c:168: error: for each function it appears in.)
    drivers/rtc/rtc-imxdi.c:168: error: implicit declaration of function 'signal_pending'
    drivers/rtc/rtc-imxdi.c:168: error: implicit declaration of function 'schedule_timeout'
    drivers/rtc/rtc-imxdi.c: In function 'dryice_norm_irq':
    drivers/rtc/rtc-imxdi.c:329: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

    Signed-off-by: Axel Lin
    Cc: Baruch Siach
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

08 Sep, 2011

1 commit

  • * 'timers-fixes-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip:
    rtc: twl: Fix registration vs. init order
    rtc: Initialized rtc_time->tm_isdst
    rtc: Fix RTC PIE frequency limit
    rtc: rtc-twl: Remove lockdep related local_irq_enable()
    rtc: rtc-twl: Switch to using threaded irq
    rtc: ep93xx: Fix 'rtc' may be used uninitialized warning
    alarmtimers: Avoid possible denial of service with high freq periodic timers
    alarmtimers: Memset itimerspec passed into alarm_timer_get
    alarmtimers: Avoid possible null pointer traversal

    Linus Torvalds
     

27 Aug, 2011

2 commits

  • Only register as an RTC device after the hardware has been
    successfully initialized. The RTC class driver will call
    back to this driver to read a pending alarm, and other
    drivers watching for new devices on the RTC class may
    read the RTC time upon registration. Such access might
    occur while the RTC is stopped, prior to clearing
    pending alarms, etc.

    The new ordering also avoids leaving the platform
    device drvdata set to an unregistered struct rtc_device *
    on probe errors.

    Signed-off-by: Todd Poynor
    Signed-off-by: John Stultz

    Todd Poynor
     
  • Even though the Linux kernel does not use the tm_isdst field, it is
    exposed as part of the ABI. This field can accidentally be left
    initialized, which is why we currently memset buffers returned to
    userland in rtc_read_time.

    There is a case however where the field can return garbage from the
    stack though when using the RTC_ALM_READ ioctl on the rtc device. This
    ioctl invokes rtc_read_alarm, which is careful to memset the rtc_wkalrm
    buffer that is copied to userland, but it then uses a struct copy to
    assign to alarm->time given the return value from rtc_ktime_to_tm().

    rtc_ktime_to_tm() is implemented by calling rtc_time_to_tm using a
    derivative seconds counds from ktime, but rtc_time_to_tm does not assign
    a value to ->tm_isdst. This results in garbage from rtc_ktime_to_tm()'s
    frame ending up being copied out to userland as part of the returned
    rtc_wkalrm.

    Fix this by initializing rtc_time->tm_isdst to 0 in rtc_time_to_tm.

    Signed-off-by: Mike Waychison
    Signed-off-by: John Stultz

    Mike Waychison
     

26 Aug, 2011

2 commits

  • The previous rtc-s3c had two issues related with its IRQ.

    1. Users cannot open rtc multiple times because an open operation
    calls request_irq on the same IRQ. (e.g., two user processes wants to
    open and read RTC time from rtc-s3c at the same time)

    2. If alarm is set and no one has the rtc opened with filesystem
    (either the alarm is set by kernel/boot-loader or user set an alarm and
    closed rtc dev file), the pending bit is not cleared and no further
    interrupt is invoked. When the alarm is used by the system itself such
    as a resume from suspend-to-RAM or other Low-power modes/idle, this is
    a critical issue.

    This patch mitigates these issues by calling request_irq at probe and
    free_irq at remove.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Acked-by: Kukjin Kim
    Cc: Alessandro Zummo
    Cc: Changhwan Youn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    MyungJoo Ham
     
  • RTC-S3C used to print out debug messages incorrectly. This patch
    corrects incorrect outputs. (undecoded bcd numbers, incorrectly decoded
    register values)

    This patch affects the pr-debug messages only.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Acked-by: Kukjin Kim
    Cc: Alessandro Zummo
    Cc: Changhwan Youn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    MyungJoo Ham
     

18 Aug, 2011

1 commit


11 Aug, 2011

4 commits

  • Thomas earlier submitted a fix to limit the RTC PIE freq, but
    picked 5000Hz out of the air. Willy noticed that we should
    instead use the 8192Hz max from the rtc man documentation.

    Cc: Willy Tarreau
    Cc: stable@kernel.org
    Cc: Thomas Gleixner
    Signed-off-by: John Stultz

    John Stultz
     
  • Now that the irq is properly threaded (due to it needing i2c access)
    we should also remove the local_irq_enable() call in twl_rtc_interrupt.
    Testing this with Pandaboard, the RTC is still working.

    [Reworked commit message -jstultz]
    Signed-off-by: John Stultz

    Sebastian Reichel
     
  • The driver is accessing to i2c bus in interrupt handler.
    Therefore, it should use threaded irq.

    Signed-off-by: Ilkka Koskinen
    Acked-by: Balaji T K
    Signed-off-by: John Stultz

    Ilkka Koskinen
     
  • commit 92d921c5d "rtc: ep93xx: Initialize drvdata before registering device"
    ensures the drvdata is initialized prior to registering the rtc device.
    But it set the drvdata to an uninitialized pointer.
    Thus calling platform_get_drvdata in ep93xx_rtc_remove does not get correct address.

    This patch fixes below warning by adding struct rtc_device *rtc to struct ep93xx_rtc.
    Then set platform drvdata to ep93xx_rtc instead of rtc.

    CC drivers/rtc/rtc-ep93xx.o
    drivers/rtc/rtc-ep93xx.c: In function 'ep93xx_rtc_probe':
    drivers/rtc/rtc-ep93xx.c:154: warning: 'rtc' may be used uninitialized in this function

    Signed-off-by: Axel Lin
    Signed-off-by: John Stultz

    Axel Lin
     

04 Aug, 2011

1 commit

  • As the comment explains, the intention of the code is to clear the
    OMAP_RTC_CTRL_MODE_12_24 bit, but instead it only clears the
    OMAP_RTC_CTRL_SPLIT and OMAP_RTC_CTRL_AUTO_COMP bits, which should be
    kept. OMAP_RTC_CTRL_DISABLE, OMAP_RTC_CTRL_SET_32_COUNTER,
    OMAP_RTC_CTRL_TEST, and OMAP_RTC_CTRL_ROUND_30S are also better off
    being cleared.

    Signed-off-by: Daniel Glöckner
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Glöckner
     

27 Jul, 2011

6 commits

  • Ben reported a lockup related to rtc. The lockup happens due to:

    CPU0 CPU1

    rtc_irq_set_state() __run_hrtimer()
    spin_lock_irqsave(&rtc->irq_task_lock) rtc_handle_legacy_irq();
    spin_lock(&rtc->irq_task_lock);
    hrtimer_cancel()
    while (callback_running);

    So the running callback never finishes as it's blocked on
    rtc->irq_task_lock.

    Use hrtimer_try_to_cancel() instead and drop rtc->irq_task_lock while
    waiting for the callback. Fix this for both rtc_irq_set_state() and
    rtc_irq_set_freq().

    Signed-off-by: Thomas Gleixner
    Reported-by: Ben Greear
    Cc: John Stultz
    Cc: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Due to the hrtimer self rearming mode a user can DoS the machine simply
    because it's starved by hrtimer events.

    The RTC hrtimer is self rearming. We really need to limit the frequency
    to something sensible.

    Signed-off-by: Thomas Gleixner
    Cc: John Stultz
    Cc: Ingo Molnar
    Cc: Ben Greear
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The code checks the correctness of the parameters, but unconditionally
    arms/disarms the hrtimer.

    The result is that a random task might arm/disarm rtc timer and surprise
    the real owner by either generating events or by stopping them.

    Signed-off-by: Thomas Gleixner
    Cc: John Stultz
    Cc: Ingo Molnar
    Cc: Ben Greear
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The RTC pie hrtimer is self rearming. We really need to limit the
    frequency to something sensible. Thus limit it to the 8192Hz max
    value from the rtc man documentation

    Cc: Willy Tarreau
    Cc: stable@kernel.org
    Signed-off-by: Thomas Gleixner
    [jstultz: slightly reworked to use RTC_MAX_FREQ value]
    Signed-off-by: John Stultz

    Thomas Gleixner
     
  • Ben reported a lockup related to rtc. The lockup happens due to:

    CPU0 CPU1

    rtc_irq_set_state() __run_hrtimer()
    spin_lock_irqsave(&rtc->irq_task_lock) rtc_handle_legacy_irq();
    spin_lock(&rtc->irq_task_lock);
    hrtimer_cancel()
    while (callback_running);

    So the running callback never finishes as it's blocked on
    rtc->irq_task_lock.

    Use hrtimer_try_to_cancel() instead and drop rtc->irq_task_lock while
    waiting for the callback. Fix this for both rtc_irq_set_state() and
    rtc_irq_set_freq().

    Cc: stable@kernel.org
    Reported-by: Ben Greear
    Signed-off-by: Thomas Gleixner
    Signed-off-by: John Stultz

    Thomas Gleixner
     
  • In rtc_irq_set_state, the code checks the correctness of the parameters,
    but then goes on to unconditionally arms/disarms the hrtimer. Thus a
    random task might arm/disarm rtc timer and surprise the real owner by
    either generating events or by stopping them.

    Cc: stable@kernel.org
    Signed-off-by: Thomas Gleixner
    Signed-off-by: John Stultz

    Thomas Gleixner
     

26 Jul, 2011

7 commits

  • * Merge akpm patch series: (122 commits)
    drivers/connector/cn_proc.c: remove unused local
    Documentation/SubmitChecklist: add RCU debug config options
    reiserfs: use hweight_long()
    reiserfs: use proper little-endian bitops
    pnpacpi: register disabled resources
    drivers/rtc/rtc-tegra.c: properly initialize spinlock
    drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
    drivers/rtc: add support for Qualcomm PMIC8xxx RTC
    drivers/rtc/rtc-s3c.c: support clock gating
    drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
    init: skip calibration delay if previously done
    misc/eeprom: add eeprom access driver for digsy_mtc board
    misc/eeprom: add driver for microwire 93xx46 EEPROMs
    checkpatch.pl: update $logFunctions
    checkpatch: make utf-8 test --strict
    checkpatch.pl: add ability to ignore various messages
    checkpatch: add a "prefer __aligned" check
    checkpatch: validate signature styles and To: and Cc: lines
    checkpatch: add __rcu as a sparse modifier
    checkpatch: suggest using min_t or max_t
    ...

    Did this as a merge because of (trivial) conflicts in
    - Documentation/feature-removal-schedule.txt
    - arch/xtensa/include/asm/uaccess.h
    that were just easier to fix up in the merge than in the patch series.

    Linus Torvalds
     
  • Using __SPIN_LOCK_UNLOCKED for a dynamically allocated lock is wrong and
    breaks the build with PREEMPT_RT_FULL.

    Signed-off-by: Uwe Kleine-König
    Cc: Andrew Chew
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • We forget to save the return value of the call to
    twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); in 'ret', making the
    test of 'ret < 0' dead code since 'ret' then couldn't possibly have
    changed since the last test just a few lines above. It also makes us not
    detect failures from that specific twl_rtc_write_u8() call.

    Signed-off-by: Jesper Juhl
    Cc: Alessandro Zummo
    Cc: Alexandre Rusev
    Cc: "George G. Davis"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Add support for PMIC8xxx based RTC. PMIC8xxx is Qualcomm's power
    management IC that internally houses an RTC module. This driver
    communicates with the PMIC module over SSBI bus.

    [akpm@linux-foundation.org: cosmetic tweaks]
    Acked-by: Wan ZongShun
    Reviewed-by: Stephen Boyd
    Signed-off-by: Anirudh Ghayal
    Signed-off-by: Ashay Jaiswal
    Cc: Samuel Ortiz
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anirudh Ghayal
     
  • Add support for clock gating. Power consumption can be reduced by setting
    rtc_clk disabled state except for when RTC related registers are accessed.

    Signed-off-by: Donggeun Kim
    Signed-off-by: MyungJoo Ham
    Signed-off-by: KyungMin Park
    Cc: Alessandro Zummo
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Donggeun Kim
     
  • MPC5200B contains a limited version of RTC from MPC5121. Add support for
    the RTC on that CPU.

    Signed-off-by: Dmitry Eremin-Solenikov
    Cc: Alessandro Zummo
    Cc: Anatolij Gustschin
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Eremin-Solenikov
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

23 Jul, 2011

2 commits

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

    * 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Serialize EFI time accesses on rtc_lock
    x86: Serialize SMP bootup CMOS accesses on rtc_lock
    rtc: stmp3xxx: Remove UIE handlers
    rtc: stmp3xxx: Get rid of mach-specific accessors
    rtc: stmp3xxx: Initialize drvdata before registering device
    rtc: stmp3xxx: Port stmp-functions to mxs-equivalents
    rtc: stmp3xxx: Restore register definitions
    rtc: vt8500: Use define instead of hardcoded value for status bit

    Linus Torvalds
     
  • …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:
    time: Fix stupid KERN_WARN compile issue
    rtc: Avoid accumulating time drift in suspend/resume
    time: Avoid accumulating time drift in suspend/resume
    time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime

    Linus Torvalds
     

11 Jul, 2011

1 commit


02 Jul, 2011

4 commits

  • The RTC core handles UIE since 6610e08 (RTC: Rework RTC code to use
    timerqueue for events), so remove the specific interrupt in this driver.
    To make it work at all, enable interrupts in set_alarm() if needed. Drop
    IRQF_DISABLED which is deprecated, while we are here. Finally, add my
    copyright after all these changes.

    Signed-off-by: Wolfram Sang
    Tested-by: Shawn Guo
    Signed-off-by: John Stultz

    Wolfram Sang
     
  • Replace the accessors with standard readl/writel to remove their
    platform-dependency. Also, drop __raw_(read|write)l-accessors while we
    are here.

    Signed-off-by: Wolfram Sang
    Tested-by: Shawn Guo
    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.

    Signed-off-by: Wolfram Sang
    Tested-by: Shawn Guo
    Signed-off-by: John Stultz

    Wolfram Sang
     
  • The stmp3xxx driver used to include functions from a stmp-specific
    include. Because of consolidation, plat-stmp has now been removed and
    merged with the compatible mach-mxs.

    Use the apropriate mxs-functions for transition. The accessors will be
    converted to readl/writel in a later patch.

    Signed-off-by: Wolfram Sang
    Tested-by: Shawn Guo
    Signed-off-by: John Stultz

    Wolfram Sang