15 Oct, 2008

4 commits

  • This driver replaces the broken ip27-rtc driver in drivers/char and
    gives back RTC support for SGI IP27 machines.

    Signed-off-by: Thomas Bogendoerfer
    Acked-by: Alessandro Zummo
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • This driver replaces the broken DS1286 driver in drivers/char and gives back
    RTC support for SGI IP22 and IP28 machines.

    Signed-off-by: Thomas Bogendoerfer
    Acked-by: Alessandro Zummo
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • We shouldn't rely on "pnp_platform_devices" to tell us whether there
    is a PNP RTC device.

    I introduced "pnp_platform_devices", but I think it was a mistake.
    All it tells us is whether we found any PNPBIOS or PNPACPI devices.
    Many machines have some PNP devices, but do not describe the RTC
    via PNP. On those machines, we need to do the platform driver probe
    to find the RTC.

    We should just register the PNP driver and see whether it claims anything.
    If we don't find a PNP RTC, fall back to the platform driver probe.

    This (in conjunction with the arch/x86/kernel/rtc.c patch to add
    a platform RTC device when PNP doesn't have one) should resolve
    these issues:

    http://bugzilla.kernel.org/show_bug.cgi?id=11580
    https://bugzilla.redhat.com/show_bug.cgi?id=451188

    Signed-off-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki
    Acked-by: David Brownell
    Reported-by: Rik Theys
    Reported-by: shr_msn@yahoo.com.tw
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Move rtc_wake_setup() from drivers/acpi/glue.c into the RTC driver
    in drivers/rtc/rtc-cmos.c.

    This removes the ordering constraint between the module_init(acpi_rtc_init)
    and the cmos_do_probe() code that depends on it.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

12 Oct, 2008

1 commit


04 Oct, 2008

1 commit

  • When userspace uses SIGIO notification and forgets to disable it before
    closing file descriptor, rtc->async_queue contains stale pointer to struct
    file. When user space enables again SIGIO notification in different
    process, kernel dereferences this (poisoned) pointer and crashes.

    So disable SIGIO notification on close.

    Kernel panic:
    (second run of qemu (requires echo 1024 > /sys/class/rtc/rtc0/max_user_freq))

    general protection fault: 0000 [1] PREEMPT
    CPU 0
    Modules linked in: af_packet snd_pcm_oss snd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq usbhid tuner tea5767 tda8290 tuner_xc2028 xc5000 tda9887 tuner_simple tuner_types mt20xx tea5761 tda9875 uhci_hcd ehci_hcd usbcore bttv snd_via82xx snd_ac97_codec ac97_bus snd_pcm snd_timer ir_common compat_ioctl32 snd_page_alloc videodev v4l1_compat snd_mpu401_uart snd_rawmidi v4l2_common videobuf_dma_sg videobuf_core snd_seq_device snd btcx_risc soundcore tveeprom i2c_viapro
    Pid: 5781, comm: qemu-system-x86 Not tainted 2.6.27-rc6 #363
    RIP: 0010:[] [] __lock_acquire+0x3db/0x73f
    RSP: 0000:ffffffff80674cb8 EFLAGS: 00010002
    RAX: ffff8800224c62f0 RBX: 0000000000000046 RCX: 0000000000000002
    RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8800224c62f0
    RBP: ffffffff80674d08 R08: 0000000000000002 R09: 0000000000000001
    R10: ffffffff80238941 R11: 0000000000000001 R12: 0000000000000000
    R13: 6b6b6b6b6b6b6b6b R14: ffff88003a450080 R15: 0000000000000000
    FS: 00007f98b69516f0(0000) GS:ffffffff80623200(0000) knlGS:00000000f7cc86d0
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000a87000 CR3: 0000000022598000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process qemu-system-x86 (pid: 5781, threadinfo ffff880028812000, task ffff88003a450080)
    Stack: ffffffff80674cf8 0000000180238440 0000000200000002 0000000000000000
    ffff8800224c62f0 0000000000000046 0000000000000000 0000000000000002
    0000000000000002 0000000000000000 ffffffff80674d68 ffffffff8024fc7a
    Call Trace:
    [] lock_acquire+0x85/0xa9
    [] ? send_sigio+0x2a/0x184
    [] _read_lock+0x3e/0x4a
    [] ? send_sigio+0x2a/0x184
    [] send_sigio+0x2a/0x184
    [] ? __lock_acquire+0x6e1/0x73f
    [] ? kill_fasync+0x2c/0x4e
    [] __kill_fasync+0x54/0x65
    [] kill_fasync+0x3a/0x4e
    [] rtc_update_irq+0x9c/0xa5
    [] cmos_interrupt+0xae/0xc0
    [] handle_IRQ_event+0x25/0x5a
    [] handle_edge_irq+0xdd/0x123
    [] do_IRQ+0xe4/0x144
    [] ret_from_intr+0x0/0xf
    [] ? __alloc_pages_internal+0xe7/0x3ad
    [] ? clear_page_c+0x7/0x10
    [] ? get_page_from_freelist+0x385/0x450
    [] ? __alloc_pages_internal+0xe7/0x3ad
    [] ? anon_vma_prepare+0x2e/0xf6
    [] ? handle_mm_fault+0x227/0x6a5
    [] ? do_page_fault+0x494/0x83f
    [] ? error_exit+0x0/0xa9

    Code: cc 41 39 45 28 74 24 e8 5e 1d 0f 00 85 c0 0f 84 6a 03 00 00 83 3d 8f a9 aa 00 00 be 47 03 00 00 0f 84 6a 02 00 00 e9 53 03 00 00 ff 85 38 01 00 00 45 8b be 90 06 00 00 41 83 ff 2f 76 24 e8
    RIP [] __lock_acquire+0x3db/0x73f
    RSP
    ---[ end trace 431877d860448760 ]---
    Kernel panic - not syncing: Aiee, killing interrupt handler!

    Signed-off-by: Marcin Slusarz
    Acked-by: Alessandro Zummo
    Acked-by: David Brownell
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     

23 Sep, 2008

1 commit

  • Fix for linux-next's

    : Author: David S. Miller 2008-08-28 19:54:17
    : Committer: David S. Miller 2008-08-29 14:16:45
    : Parent: 7f60459921bd24e86b21e07c42244c510b4f46b2 (Blackfin RTC Driver: BF561 not have on-chip RTC)
    : Child: cca4c231028405950a15f5a27d7326d18d909784 (rtc: Add TI BQ4802 RTC driver.)
    : Branches: git-alsa-tiwai, linux-next
    : Follows: v2.6.27-rc4
    : Precedes: next-20080902
    :
    : rtc: Allow RTC_DRV_CMOS to be used on SPARC.

    In file included from drivers/rtc/rtc-cmos.c:40:
    include/asm-generic/rtc.h: In function 'rtc_is_updating':
    include/asm-generic/rtc.h:40: error: 'rtc_port' undeclared (first use in this function)
    include/asm-generic/rtc.h:40: error: (Each undeclared identifier is reported only once
    include/asm-generic/rtc.h:40: error: for each function it appears in.)
    include/asm-generic/rtc.h: In function 'get_rtc_time':
    include/asm-generic/rtc.h:73: error: 'rtc_port' undeclared (first use in this function)
    include/asm-generic/rtc.h: In function 'set_rtc_time':
    include/asm-generic/rtc.h:160: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_read_alarm':
    drivers/rtc/rtc-cmos.c:193: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_checkintr':
    drivers/rtc/rtc-cmos.c:255: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_irq_enable':
    drivers/rtc/rtc-cmos.c:272: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_irq_disable':
    drivers/rtc/rtc-cmos.c:292: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_set_alarm':
    drivers/rtc/rtc-cmos.c:337: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_irq_set_freq':
    drivers/rtc/rtc-cmos.c:378: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_procfs':
    drivers/rtc/rtc-cmos.c:455: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_nvram_read':
    drivers/rtc/rtc-cmos.c:519: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_nvram_write':
    drivers/rtc/rtc-cmos.c:551: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_interrupt':
    drivers/rtc/rtc-cmos.c:588: error: 'rtc_port' undeclared (first use in this function)
    drivers/rtc/rtc-cmos.c: In function 'cmos_do_probe':
    drivers/rtc/rtc-cmos.c:722: error: 'rtc_port' undeclared (first use in this function)

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     

17 Sep, 2008

1 commit


10 Sep, 2008

2 commits


08 Sep, 2008

1 commit


04 Sep, 2008

3 commits


03 Sep, 2008

2 commits

  • Update rtc-cmos shutdown handling to leave RTC alarms active, resolving
    http://bugzilla.kernel.org/show_bug.cgi?id=11411 on several boards. There
    are still some systems where the ACPI event handling doesn't cooperate.
    (Possibly related to bugid 11312, reporting the spontaneous disabling of
    RTC events.)

    Bug 11411 reported that changes to work around some ACPI event issues
    broke wake-from-S5 handling, as used for DVR applications. (They like to
    power off, then wake later to record programs.)

    [yakui.zhao@intel.com: add shutdown for PNP devices]
    [dbrownell@users.sourceforge.net: update comments]
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Zhao Yakui
    Signed-off-by: Zhang Rui
    Signed-off-by: David Brownell
    Cc: Stefan Bauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • commit 945185a69daa457c4c5e46e47f4afad7dcea734f ("rtc: rtc_time_to_tm: use
    unsigned arithmetic") changed the some types in rtc_time_to_tm() to
    unsigned:

    void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
    {
    - register int days, month, year;
    + unsigned int days, month, year;

    This doesn't work for all cases, because days is checked for < 0 later
    on:

    if (days < 0) {
    year -= 1;
    days += 365 + LEAP_YEAR(year);
    }

    I think the correct fix would be to keep days signed and do an appropriate
    cast later on.

    Signed-off-by: Jan Altenberg
    Cc: Maciej W. Rozycki
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Dmitri Vorobiev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Altenberg
     

30 Aug, 2008

4 commits


24 Aug, 2008

1 commit


21 Aug, 2008

6 commits


13 Aug, 2008

2 commits


07 Aug, 2008

3 commits


06 Aug, 2008

8 commits