[lkml]   [2002]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [DRIVER][RFC] SC1200 Watchdog driver
    > Put the GETTIMEOUT stuff in an ioctl, heres my current version, it 
    > implements a number of the ioctls as well as the reboot notifier and
    > semaphores for locking.

    Aside from the other comments Jeff made its got one bug that I only noticed
    because I fixed it in a pile of other stuff 8)

    > /* Write to Data Register */
    > static inline void sc1200wdt_write_data(unsigned char index, unsigned char data)
    > {
    > outb_p(index, PMIR);
    > outb(data, PMDR);
    > }

    two instruction sequence

    > sc1200wdt_write_data(WDTO, timeout);
    > return 0;

    ioctl from two processes one per cpu at the same time

    > static int sc1200wdt_release(struct inode *inode, struct file *file)
    > {
    > /* Disable it on the way out */
    > sc1200wdt_write_data(WDTO, 0);
    > up(&open_sem);

    NOWAYOUT support is missing - trivial to fix. Just remember to MOD_INC_USE..
    on the nowayout path

    > static int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
    > {
    > if (code == SYS_DOWN || code == SYS_HALT)
    > sc1200wdt_write_data(WDTO, 0);

    Ditto on the nowayout

    Alan in pedantic mode

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:24    [W:0.023 / U:63.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site