09 May, 2007

40 commits

  • An irqaction structure won't be added to an IRQ descriptor irqaction list if
    it doesn't agree with other irqactions on the IRQF_PERCPU flag. Don't check
    for this flag to change IRQ descriptor `status' for every irqaction added to
    the list, Doing the check only for the first irqaction added is enough.

    Signed-off-by: Ahmed S. Darwish
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ahmed S. Darwish
     
  • sysdev.h uses THIS_MODULE so should include .

    [akpm@linux-foundation.org: couple of fixes]
    Signed-off-by: Ralf Baechle
    Cc: Andi Kleen
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Add a new deferrable delayed work init. This can be used to schedule work
    that are 'unimportant' when CPU is idle and can be called later, when CPU
    eventually comes out of idle.

    Use this init in cpufreq ondemand governor.

    Signed-off-by: Venkatesh Pallipadi
    Cc: Dave Jones
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venki Pallipadi
     
  • Introduce a new flag for timers - deferrable: Timers that work normally
    when system is busy. But, will not cause CPU to come out of idle (just to
    service this timer), when CPU is idle. Instead, this timer will be
    serviced when CPU eventually wakes up with a subsequent non-deferrable
    timer.

    The main advantage of this is to avoid unnecessary timer interrupts when
    CPU is idle. If the routine currently called by a timer can wait until
    next event without any issues, this new timer can be used to setup timer
    event for that routine. This, with dynticks, allows CPUs to be lazy,
    allowing them to stay in idle for extended period of time by reducing
    unnecesary wakeup and thereby reducing the power consumption.

    This patch:

    Builds this new timer on top of existing timer infrastructure. It uses
    last bit in 'base' pointer of timer_list structure to store this deferrable
    timer flag. __next_timer_interrupt() function skips over these deferrable
    timers when CPU looks for next timer event for which it has to wake up.

    This is exported by a new interface init_timer_deferrable() that can be
    called in place of regular init_timer().

    [akpm@linux-foundation.org: Privatise a #define]
    Signed-off-by: Venkatesh Pallipadi
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Oleg Nesterov
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venki Pallipadi
     
  • Update some of the layered parport_driver code to use parport->dev:

    - i2c-parport (parent of i2c_adapter)
    - spi_butterfly (parent of spi_master, allowing cruft removal)
    - lp (creating class_device)
    - ppdev (parent of parportN device)
    - tipar (creating class_device)

    There are still drivers that should be updated, like some of the input
    drivers; but they won't be any worse off than they are today.

    Signed-off-by: David Brownell
    Cc: Greg KH
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Give legacy parallel ports a platform device in the device tree.

    This is a quick and dirty implementation; it doesn't actually convert the
    legacy parport code to the device driver model (by splitting out probing from
    device creation). But at least parallel port device drivers will finally have
    a device to work with.

    Signed-off-by: Jean Delvare
    Signed-off-by: David Brownell
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Currently a parport_driver can't get a handle on the device node for the
    underlying parport (PNPACPI, PCI, etc). That prevents correct placement of
    sysfs child nodes, which can affect things like power management.

    This patch adds a field to "struct parport" pointing to that device node, and
    updates non-legacy port drivers to initialize that device pointer. That field
    replaces the analagous PCI-only support in parport_pc.

    [akpm@linux-foundation.org: fix powerpc build]
    Signed-off-by: David Brownell
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • setup_irq() releases a desc->lock before calling register_handler_proc(), so
    the iteration over the IRQ action list is not protected.

    (akpm: the check itself is still racy, but at least it probably won't oops
    now).

    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Adamushko
     
  • Delete the unused header file include/linux/awe_voice.h, as well as
    its corresponding Kbuild entry.

    Signed-off-by: Robert P. J. Day
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Currently cpuset_exit() changes the exiting task's ->cpuset pointer w/o
    taking task_lock(). This can lead to ugly races between attach_task and
    cpuset_exit. Details of the races are described at
    http://lkml.org/lkml/2007/3/24/132.

    Patch below closes those races.

    Signed-off-by: Srivatsa Vaddagiri
    Cc: Paul Jackson
    Cc: Balbir Singh
    Cc: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Srivatsa Vaddagiri
     
  • remove_inode_dquot_ref() can now become static.

    Signed-off-by: Adrian Bunk
    Acked-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • I was playing with some code that sometimes got a string where a %n
    match should have been done where the input string ended, for example
    like this:

    sscanf("abc123", "abc%d%n", &a, &n); /* doesn't work */
    sscanf("abc123a", "abc%d%n", &a, &n); /* works */

    However, the scanf function in the kernel doesn't convert the %n in that
    case because it has already matched the complete input after %d and just
    completely stops matching then. This patch fixes that.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Johannes Berg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     
  • Signed-off-by: Robert P. J. Day
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Schedule obsolete OSS drivers for removal.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Additions and removal from tty_drivers list were just done as well as
    iterating on it for /proc/tty/drivers generation.

    testing: modprobe/rmmod loop of simple module which does nothing but
    tty_register_driver() vs cat /proc/tty/drivers loop

    BUG: unable to handle kernel paging request at virtual address 6b6b6b6b
    printing eip:
    c01cefa7
    *pde = 00000000
    Oops: 0000 [#1]
    PREEMPT
    last sysfs file: devices/pci0000:00/0000:00:1d.7/usb5/5-0:1.0/bInterfaceProtocol
    Modules linked in: ohci_hcd af_packet e1000 ehci_hcd uhci_hcd usbcore xfs
    CPU: 0
    EIP: 0060:[] Not tainted VLI
    EFLAGS: 00010297 (2.6.21-rc4-mm1 #4)
    EIP is at vsnprintf+0x3a4/0x5fc
    eax: 6b6b6b6b ebx: f6cb50f2 ecx: 6b6b6b6b edx: fffffffe
    esi: c0354700 edi: f6cb6000 ebp: 6b6b6b6b esp: f31f5e68
    ds: 007b es: 007b fs: 00d8 gs: 0033 ss: 0068
    Process cat (pid: 31864, ti=f31f4000 task=c1998030 task.ti=f31f4000)
    Stack: 00000000 c0103f20 c013003a c0103f20 00000000 f6cb50da 0000000a 00000f0e
    f6cb50f2 00000010 00000014 ffffffff ffffffff 00000007 c0354753 f6cb50f2
    f73e39dc f73e39dc 00000001 c0175416 f31f5ed8 f31f5ed4 0ee00000 f32090bc
    Call Trace:
    [] restore_nocheck+0x12/0x15
    [] mark_held_locks+0x6d/0x86
    [] restore_nocheck+0x12/0x15
    [] seq_printf+0x2e/0x52
    [] show_tty_range+0x35/0x1f3
    [] seq_printf+0x2e/0x52
    [] show_tty_driver+0x8a/0x1d9
    [] seq_read+0x70/0x2ba
    [] seq_read+0x0/0x2ba
    [] proc_reg_read+0x63/0x9f
    [] vfs_read+0x7d/0xb5
    [] proc_reg_read+0x0/0x9f
    [] sys_read+0x41/0x6a
    [] sysenter_past_esp+0x5f/0x99
    =======================
    Code: 00 8b 4d 04 e9 44 ff ff ff 8d 4d 04 89 4c 24 50 8b 6d 00 81 fd ff 0f 00 00 b8 a4 c1 35 c0 0f 46 e8 8b 54 24 2c 89 e9 89 c8 eb 06 38 00 74 07 40 4a 83 fa ff 75 f4 29 c8 89 c6 8b 44 24 28 89
    EIP: [] vsnprintf+0x3a4/0x5fc SS:ESP 0068:f31f5e68

    Signed-off-by: Alexey Dobriyan
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Remove do_sync_file_range() and convert callers to just use
    do_sync_mapping_range().

    Signed-off-by: Mark Fasheh
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Fasheh
     
  • cs5535_gpio, add MODULE_DEVICE_TABLE

    Signed-off-by: Jiri Slaby
    Cc: Ben Gardner
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • rocket, add MODULE_DEVICE_TABLE

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • This patch moves the die notifier handling to common code. Previous
    various architectures had exactly the same code for it. Note that the new
    code is compiled unconditionally, this should be understood as an appel to
    the other architecture maintainer to implement support for it aswell (aka
    sprinkling a notify_die or two in the proper place)

    arm had a notifiy_die that did something totally different, I renamed it to
    arm_notify_die as part of the patch and made it static to the file it's
    declared and used at. avr32 used to pass slightly less information through
    this interface and I brought it into line with the other architectures.

    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
    [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
    Signed-off-by: Christoph Hellwig
    Cc:
    Cc: Russell King
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Fix sparse NULL warnings:
    kernel/kprobes.c:915:49: warning: Using plain integer as NULL pointer

    Signed-off-by: Randy Dunlap
    Acked-by: Ananth N Mavinakayanahalli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • REISER_FS /proc option needs to depend on PROC_FS.

    fs/reiserfs/procfs.c: In function 'show_super':
    fs/reiserfs/procfs.c:134: error: 'reiserfs_proc_info_data_t' has no member named 'max_hash_collisions'
    fs/reiserfs/procfs.c:134: error: 'reiserfs_proc_info_data_t' has no member named 'breads'
    fs/reiserfs/procfs.c:135: error: 'reiserfs_proc_info_data_t' has no member named 'bread_miss'
    fs/reiserfs/procfs.c:135: error: 'reiserfs_proc_info_data_t' has no member named 'search_by_key'
    fs/reiserfs/procfs.c:136: error: 'reiserfs_proc_info_data_t' has no member named 'search_by_key_fs_changed'
    fs/reiserfs/procfs.c:136: error: 'reiserfs_proc_info_data_t' has no member named 'search_by_key_restarted'
    fs/reiserfs/procfs.c:137: error: 'reiserfs_proc_info_data_t' has no member named 'insert_item_restarted'
    fs/reiserfs/procfs.c:137: error: 'reiserfs_proc_info_data_t' has no member named 'paste_into_item_restarted'
    fs/reiserfs/procfs.c:138: error: 'reiserfs_proc_info_data_t' has no member named 'cut_from_item_restarted'
    fs/reiserfs/procfs.c:139: error: 'reiserfs_proc_info_data_t' has no member named 'delete_solid_item_restarted'
    fs/reiserfs/procfs.c:139: error: 'reiserfs_proc_info_data_t' has no member named 'delete_item_restarted'
    fs/reiserfs/procfs.c:140: error: 'reiserfs_proc_info_data_t' has no member named 'leaked_oid'
    fs/reiserfs/procfs.c:140: error: 'reiserfs_proc_info_data_t' has no member named 'leaves_removable'
    fs/reiserfs/procfs.c: In function 'show_per_level':
    fs/reiserfs/procfs.c:184: error: 'reiserfs_proc_info_data_t' has no member named 'balance_at'
    fs/reiserfs/procfs.c:185: error: 'reiserfs_proc_info_data_t' has no member named 'sbk_read_at'
    fs/reiserfs/procfs.c:186: error: 'reiserfs_proc_info_data_t' has no member named 'sbk_fs_changed'
    fs/reiserfs/procfs.c:187: error: 'reiserfs_proc_info_data_t' has no member named 'sbk_restarted'
    fs/reiserfs/procfs.c:188: error: 'reiserfs_proc_info_data_t' has no member named 'free_at'
    fs/reiserfs/procfs.c:189: error: 'reiserfs_proc_info_data_t' has no member named 'items_at'
    fs/reiserfs/procfs.c:190: error: 'reiserfs_proc_info_data_t' has no member named 'can_node_be_removed'
    fs/reiserfs/procfs.c:191: error: 'reiserfs_proc_info_data_t' has no member named 'lnum'
    fs/reiserfs/procfs.c:192: error: 'reiserfs_proc_info_data_t' has no member named 'rnum'
    fs/reiserfs/procfs.c:193: error: 'reiserfs_proc_info_data_t' has no member named 'lbytes'
    fs/reiserfs/procfs.c:194: error: 'reiserfs_proc_info_data_t' has no member named 'rbytes'
    fs/reiserfs/procfs.c:195: error: 'reiserfs_proc_info_data_t' has no member named 'get_neighbors'
    fs/reiserfs/procfs.c:196: error: 'reiserfs_proc_info_data_t' has no member named 'get_neighbors_restart'
    fs/reiserfs/procfs.c:197: error: 'reiserfs_proc_info_data_t' has no member named 'need_l_neighbor'
    fs/reiserfs/procfs.c:197: error: 'reiserfs_proc_info_data_t' has no member named 'need_r_neighbor'
    fs/reiserfs/procfs.c: In function 'show_bitmap':
    fs/reiserfs/procfs.c:224: error: 'reiserfs_proc_info_data_t' has no member named 'free_block'
    fs/reiserfs/procfs.c:225: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c:226: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c:227: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c:228: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c:229: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c:230: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c:230: error: 'reiserfs_proc_info_data_t' has no member named 'scan_bitmap'
    fs/reiserfs/procfs.c: In function 'show_journal':
    fs/reiserfs/procfs.c:384: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:385: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:386: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:387: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:388: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:389: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:390: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:391: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:392: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:393: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:394: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:395: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:395: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c:395: error: 'reiserfs_proc_info_data_t' has no member named 'journal'
    fs/reiserfs/procfs.c: In function 'reiserfs_proc_info_init':
    fs/reiserfs/procfs.c:504: warning: implicit declaration of function '__PINFO'
    fs/reiserfs/procfs.c:504: error: request for member 'lock' in something not a structure or union
    fs/reiserfs/procfs.c: In function 'reiserfs_proc_info_done':
    fs/reiserfs/procfs.c:544: error: request for member 'lock' in something not a structure or union
    fs/reiserfs/procfs.c:545: error: request for member 'exiting' in something not a structure or union
    fs/reiserfs/procfs.c:546: error: request for member 'lock' in something not a structure or union

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • While researching the tty layer pid leaks I found a weird case in selinux when
    we drop a controlling tty because of inadequate permissions we don't do the
    normal hangup processing. Which is a problem if it happens the session leader
    has exec'd something that can no longer access the tty.

    We already have code in the kernel to handle this case in the form of the
    TIOCNOTTY ioctl. So this patch factors out a helper function that is the
    essence of that ioctl and calls it from the selinux code.

    This removes the inconsistency in handling dropping of a controlling tty and
    who knows it might even make some part of user space happy because it received
    a SIGHUP it was expecting.

    In addition since this removes the last user of proc_set_tty outside of
    tty_io.c proc_set_tty is made static and removed from tty.h

    Signed-off-by: Eric W. Biederman
    Acked-by: Alan Cox
    Cc: James Morris
    Cc: Stephen Smalley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • This patch should contain no functional changes.

    At some point I got confused and thought put_pid could not be called while a
    spin lock was held. While it may be nice to avoid that to reduce lock hold
    times put_pid can be safely called while we hold a spin lock.

    This patch removes all of the complications from the code introduced by my
    misunderstanding, making the code a little more readable.

    Signed-off-by: Eric W. Biederman
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • All of the users of proc_clear_tty are compiled into the kernel so exporting
    this symbol appears gratuitous.

    Signed-off-by: Eric W. Biederman
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The console subsystem already has an idea of a boot console, using the
    CON_BOOT flag. The implementation has some flaws though. The major
    problem is that presence of a boot console makes register_console() ignore
    any other console devices (unless explicitly specified on the kernel
    command line).

    This patch fixes the console selection code to *not* consider a boot
    console a full-featured one, so the first non-boot console registering will
    become the default console instead. This way the unregister call for the
    boot console in the register_console() function actually triggers and the
    handover from the boot console to the real console device works smoothly.
    Added a printk for the handover, so you know which console device the
    output goes to when the boot console stops printing messages.

    The disable_early_printk() call is obsolete with that patch, explicitly
    disabling the early console isn't needed any more as it works automagically
    with that patch.

    I've walked through the tree, dropped all disable_early_printk() instances
    found below arch/ and tagged the consoles with CON_BOOT if needed. The
    code is tested on x86, sh (thanks to Paul) and mips (thanks to Ralf).

    Changes to last version: Rediffed against -rc3, adapted to mips cleanups by
    Ralf, fixed "udbg-immortal" cmd line arg on powerpc.

    Signed-off-by: Gerd Hoffmann
    Acked-by: Paul Mundt
    Acked-by: Ralf Baechle
    Cc: Andi Kleen
    Cc: Alan Cox
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     
  • console.name[] is eight chars, but so is "earlyvga". So when we try to print
    console->name when using earlyvga it runs off the end of the string.

    Make it bigger.

    Diagnosed-by: Gerd Hoffmann

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Eternal quest to make

    while true; do cat /proc/fs/xfs/stat >/dev/null 2>/dev/null; done
    while true; do find /proc -type f 2>/dev/null | xargs cat >/dev/null 2>/dev/null; done
    while true; do modprobe xfs; rmmod xfs; done

    work reliably continues and now kernel oopses in the following way:

    BUG: unable to handle ... at virtual address 6b6b6b6b
    EIP is at badness
    process: cat
    proc_oom_score
    proc_info_read
    sys_fstat64
    vfs_read
    proc_info_read
    sys_read

    Failing code is prefetch hidden in list_for_each_entry() in badness().
    badness() is reachable from two points. One is proc_oom_score, another
    is out_of_memory() => select_bad_process() => badness().

    Second path grabs tasklist_lock, while first doesn't.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • LTP test sigaction_16_24 fails, because it expects sem_wait to be restarted
    if SA_RESTART is set. sem_wait is implemented with futex_wait, that
    currently doesn't support being restarted. Ulrich confirms that the call
    should be restartable.

    Implement a restart_block method to handle the relative timeout, and allow
    restarts.

    Signed-off-by: Nick Piggin
    Cc: Ulrich Drepper
    Cc: Rusty Russell
    Cc: Roland McGrath
    Cc: Oleg Nesterov
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • lguest uses the convenient futex infrastructure for inter-domain I/O, so
    expose get_futex_key, get_key_refs (renamed get_futex_key_refs) and
    drop_key_refs (renamed drop_futex_key_refs). Also means we need to expose the
    union that these use.

    No code changes.

    Signed-off-by: Rusty Russell
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Signed-off-by: Dale Farnsworth.org
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dale Farnsworth
     
  • Add an RTC driver for Ricoh RS5C313 RTC chip.

    [akpm@linux-foundation.org: Zillions of coding-style fixes]
    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Nobuhiro Iwamatsu
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nobuhiro Iwamatsu
     
  • Fix units mismatch (jiffies vs msecs) in as-iosched.c, spotted by Xiaoning
    Ding .

    Signed-off-by: Nick Piggin
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • The jsm driver doesn't currently use the uart_handle_*_change helper
    functions, which are the obvious place for things like linuxpps to tie
    into (which it now does of course), and as a result the jsm driver can
    not be used with linuxpps and anything else that ties into the
    serial_core helper functions. This patch adds calls to these helper
    functions whenever the value they manage changes. That actual storage
    of the state is not modified since the jsm driver caches the current
    settings (The 8250 driver reads them everytime a user asks for the
    state), and only updates them whenever they change.

    Signed-off-by: Len Sorensen
    Cc: Scott H Kilau
    Cc: Wendy Xiong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Len Sorensen
     
  • The jsm driver fails when you try to use the TIOCSSERIAL ioctl. The reason
    is that the driver never sets uart_port.uartclk, causing the data received
    using TIOCGSERIAL to not match the internal state of the driver. This
    patch fixes this problem by settings the uartclk to the value used by the
    serial_core (16 times the baud base).

    Signed-off-by: Len Sorensen
    Cc: Scott H Kilau
    Cc: Wendy Xiong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Len Sorensen
     
  • Switch from private uclong, etc over to standard types.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Klaus Kudielka
     
  • At least on x86_64 the present cyclades.h is broken due to the wrong size
    of uclong. This affects, of course, both the kernel and the user-level
    utilities. The symptom is that cyzload refuses to load the firmware. I
    also managed to freeze the machine when unloading the module.

    The patch below fixes this in an architecture-independent way. I have
    tested it with 2.6.19 and the driver works fine again with a Cyclades-Z on
    an Athlon 64 X2.

    [akpm@linux-foundation.org: fix warnings]

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Klaus Kudielka
     
  • Kprobes doesn't scribble the kprobe.symbol_name field. Its only set by the
    module when registering the probe. Modules that exercise good hygiene
    using the "const" qualifier will see warnings...

    warning: assignment discards qualifiers from pointer target type

    Make struct kprobe.symbol_name const char *

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Jim Keniston
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     
  • Adds the needed TCGETS2/TCSETS2 ioctl calls, structures, defines and the like.
    Tested against the test suite and passes. Other platforms should need
    roughly the same change.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • 1) Introduces a new method in 'struct dentry_operations'. This method
    called d_dname() might be called from d_path() to build a pathname for
    special filesystems. It is called without locks.

    Future patches (if we succeed in having one common dentry for all
    pipes/sockets) may need to change prototype of this method, but we now
    use : char *d_dname(struct dentry *dentry, char *buffer, int buflen);

    2) Adds a dynamic_dname() helper function that eases d_dname() implementations

    3) Defines d_dname method for sockets : No more sprintf() at socket
    creation. This is delayed up to the moment someone does an access to
    /proc/pid/fd/...

    4) Defines d_dname method for pipes : No more sprintf() at pipe
    creation. This is delayed up to the moment someone does an access to
    /proc/pid/fd/...

    A benchmark consisting of 1.000.000 calls to pipe()/close()/close() gives a
    *nice* speedup on my Pentium(M) 1.6 Ghz :

    3.090 s instead of 3.450 s

    Signed-off-by: Eric Dumazet
    Acked-by: Christoph Hellwig
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Add support for finding out the current file position, open flags and
    possibly other info in the future.

    These new entries are added:

    /proc/PID/fdinfo/FD
    /proc/PID/task/TID/fdinfo/FD

    For each fd the information is provided in the following format:

    pos: 1234
    flags: 0100002

    [bunk@stusta.de: make struct proc_fdinfo_file_operations static]
    Signed-off-by: Miklos Szeredi
    Cc: Alexey Dobriyan
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi