20 Oct, 2007

30 commits

  • is_init() is an ambiguous name for the pid==1 check. Split it into
    is_global_init() and is_container_init().

    A cgroup init has it's tsk->pid == 1.

    A global init also has it's tsk->pid == 1 and it's active pid namespace
    is the init_pid_ns. But rather than check the active pid namespace,
    compare the task structure with 'init_pid_ns.child_reaper', which is
    initialized during boot to the /sbin/init process and never changes.

    Changelog:

    2.6.22-rc4-mm2-pidns1:
    - Use 'init_pid_ns.child_reaper' to determine if a given task is the
    global init (/sbin/init) process. This would improve performance
    and remove dependence on the task_pid().

    2.6.21-mm2-pidns2:

    - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
    ppc,avr32}/traps.c for the _exception() call to is_global_init().
    This way, we kill only the cgroup if the cgroup's init has a
    bug rather than force a kernel panic.

    [akpm@linux-foundation.org: fix comment]
    [sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
    [bunk@stusta.de: kernel/pid.c: remove unused exports]
    [sukadev@us.ibm.com: Fix capability.c to work with threaded init]
    Signed-off-by: Serge E. Hallyn
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • Rename the child_reaper() function to task_child_reaper() to be similar to
    other task_* functions and to distinguish the function from 'struct
    pid_namspace.child_reaper'.

    Signed-off-by: Sukadev Bhattiprolu
    Cc: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Serge Hallyn
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • With multiple pid namespaces, a process is known by some pid_t in every
    ancestor pid namespace. Every time the process forks, the child process also
    gets a pid_t in every ancestor pid namespace.

    While a process is visible in >=1 pid namespaces, it can see pid_t's in only
    one pid namespace. We call this pid namespace it's "active pid namespace",
    and it is always the youngest pid namespace in which the process is known.

    This patch defines and uses a wrapper to find the active pid namespace of a
    process. The implementation of the wrapper will be changed in when support
    for multiple pid namespaces are added.

    Changelog:
    2.6.22-rc4-mm2-pidns1:
    - [Pavel Emelianov, Alexey Dobriyan] Back out the change to use
    task_active_pid_ns() in child_reaper() since task->nsproxy
    can be NULL during task exit (so child_reaper() continues to
    use init_pid_ns).

    to implement child_reaper() since init_pid_ns.child_reaper to
    implement child_reaper() since tsk->nsproxy can be NULL during exit.

    2.6.21-rc6-mm1:
    - Rename task_pid_ns() to task_active_pid_ns() to reflect that a
    process can have multiple pid namespaces.

    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Serge Hallyn
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • Add kmem_cache to pid_namespace to allocate pids from.

    Since both implementations expand the struct pid to carry more numerical
    values each namespace should have separate cache to store pids of different
    sizes.

    Each kmem cache is name "pid_", where is the number of numerical ids
    on the pid. Different namespaces with same level of nesting will have same
    caches.

    This patch has two FIXMEs that are to be fixed after we reach the consensus
    about the struct pid itself.

    The first one is that the namespace to free the pid from in free_pid() must be
    taken from pid. Now the init_pid_ns is used.

    The second FIXME is about the cache allocation. When we do know how long the
    object will be then we'll have to calculate this size in create_pid_cachep.
    Right now the sizeof(struct pid) value is used.

    [akpm@linux-foundation.org: coding-style repair]
    Signed-off-by: Pavel Emelianov
    Acked-by: Cedric Le Goater
    Acked-by: Sukadev Bhattiprolu
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     
  • Make get_pid_ns() return the namespace itself to look like the other getters
    and make the code using it look nicer.

    Signed-off-by: Pavel Emelianov
    Acked-by: Cedric Le Goater
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Sukadev Bhattiprolu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     
  • The set of functions process_session, task_session, process_group and
    task_pgrp is confusing, as the names can be mixed with each other when looking
    at the code for a long time.

    The proposals are to
    * equip the functions that return the integer with _nr suffix to
    represent that fact,
    * and to make all functions work with task (not process) by making
    the common prefix of the same name.

    For monotony the routines signal_session() and set_signal_session() are
    replaced with task_session_nr() and set_task_session(), especially since they
    are only used with the explicit task->signal dereference.

    Signed-off-by: Pavel Emelianov
    Acked-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Cedric Le Goater
    Cc: Herbert Poetzl
    Cc: Sukadev Bhattiprolu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     
  • When a task enters a new namespace via a clone() or unshare(), a new cgroup
    is created and the task moves into it.

    This version names cgroups which are automatically created using
    cgroup_clone() as "node_" where pid is the pid of the unsharing or
    cloned process. (Thanks Pavel for the idea) This is safe because if the
    process unshares again, it will create

    /cgroups/(...)/node_/node_

    The only possibilities (AFAICT) for a -EEXIST on unshare are

    1. pid wraparound
    2. a process fails an unshare, then tries again.

    Case 1 is unlikely enough that I ignore it (at least for now). In case 2, the
    node_ will be empty and can be rmdir'ed to make the subsequent unshare()
    succeed.

    Changelog:
    Name cloned cgroups as "node_".

    [clg@fr.ibm.com: fix order of cgroup subsystems in init/Kconfig]
    Signed-off-by: Serge E. Hallyn
    Cc: Paul Menage
    Signed-off-by: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • This patch is inspired by the discussion at
    http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics
    as suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263. The
    patch is on top of 2.6.21-mm1 with Paul's cgroups v9 patches (forward
    ported)

    This patch implements per cgroup statistics infrastructure and re-uses
    code from the taskstats interface. A new set of cgroup operations are
    registered with commands and attributes. It should be very easy to
    *extend* per cgroup statistics, by adding members to the cgroupstats
    structure.

    The current model for cgroupstats is a pull, a push model (to post
    statistics on interesting events), should be very easy to add. Currently
    user space requests for statistics by passing the cgroup file
    descriptor. Statistics about the state of all the tasks in the cgroup
    is returned to user space.

    TODO's/NOTE:

    This patch provides an infrastructure for implementing cgroup statistics.
    Based on the needs of each controller, we can incrementally add more statistics,
    event based support for notification of statistics, accumulation of taskstats
    into cgroup statistics in the future.

    Sample output

    # ./cgroupstats -C /cgroup/a
    sleeping 2, blocked 0, running 1, stopped 0, uninterruptible 0

    # ./cgroupstats -C /cgroup/
    sleeping 154, blocked 0, running 0, stopped 0, uninterruptible 0

    If the approach looks good, I'll enhance and post the user space utility for
    the same

    Feedback, comments, test results are always welcome!

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Balbir Singh
    Cc: Paul Menage
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Balbir Singh
     
  • This example subsystem exports debugging information as an aid to diagnosing
    refcount leaks, etc, in the cgroup framework.

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • This example demonstrates how to use the generic cgroup subsystem for a
    simple resource tracker that counts, for the processes in a cgroup, the
    total CPU time used and the %CPU used in the last complete 10 second interval.

    Portions contributed by Balbir Singh

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Remove the filesystem support logic from the cpusets system and makes cpusets
    a cgroup subsystem

    The "cpuset" filesystem becomes a dummy filesystem; attempts to mount it get
    passed through to the cgroup filesystem with the appropriate options to
    emulate the old cpuset filesystem behaviour.

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Add the following files to the cgroup filesystem:

    notify_on_release - configures/reports whether the cgroup subsystem should
    attempt to run a release script when this cgroup becomes unused

    release_agent - configures/reports the release agent to be used for this
    hierarchy (top level in each hierarchy only)

    releasable - reports whether this cgroup would have been auto-released if
    notify_on_release was true and a release agent was configured (mainly useful
    for debugging)

    To avoid locking issues, invoking the userspace release agent is done via a
    workqueue task; cgroups that need to have their release agents invoked by
    the workqueue task are linked on to a list.

    [pj@sgi.com: Need to include kmod.h]
    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Replace the struct css_set embedded in task_struct with a pointer; all tasks
    that have the same set of memberships across all hierarchies will share a
    css_set object, and will be linked via their css_sets field to the "tasks"
    list_head in the css_set.

    Assuming that many tasks share the same cgroup assignments, this reduces
    overall space usage and keeps the size of the task_struct down (three pointers
    added to task_struct compared to a non-cgroups kernel, no matter how many
    subsystems are registered).

    [akpm@linux-foundation.org: fix a printk]
    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Add:

    /proc/cgroups - general system info

    /proc/*/cgroup - per-task cgroup membership info

    [a.p.zijlstra@chello.nl: cgroups: bdi init hooks]
    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Add support for cgroup_clone(), a way to create new cgroups intended to
    be used for systems such as namespace unsharing. A new subsystem callback,
    post_clone(), is added to allow subsystems to automatically configure cloned
    cgroups.

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • This adds the necessary hooks to the fork() and exit() paths to ensure
    that new children inherit their parent's cgroup assignments, and that
    exiting processes release reference counts on their cgroups.

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Add write_uint() helper method for cgroup subsystems

    This helper is analagous to the read_uint() helper method for
    reporting u64 values to userspace. It's designed to reduce the amount
    of boilerplate requierd for creating new cgroup subsystems.

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

    Paul Menage
     
  • Add the per-directory "tasks" file for cgroupfs mounts; this allows the
    user to determine which tasks are members of a cgroup by reading a
    cgroup's "tasks", and to move a task into a cgroup by writing its pid to
    its "tasks".

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Generic Process Control Groups
    --------------------------

    There have recently been various proposals floating around for
    resource management/accounting and other task grouping subsystems in
    the kernel, including ResGroups, User BeanCounters, NSProxy
    cgroups, and others. These all need the basic abstraction of being
    able to group together multiple processes in an aggregate, in order to
    track/limit the resources permitted to those processes, or control
    other behaviour of the processes, and all implement this grouping in
    different ways.

    This patchset provides a framework for tracking and grouping processes
    into arbitrary "cgroups" and assigning arbitrary state to those
    groupings, in order to control the behaviour of the cgroup as an
    aggregate.

    The intention is that the various resource management and
    virtualization/cgroup efforts can also become task cgroup
    clients, with the result that:

    - the userspace APIs are (somewhat) normalised

    - it's easier to test e.g. the ResGroups CPU controller in
    conjunction with the BeanCounters memory controller, or use either of
    them as the resource-control portion of a virtual server system.

    - the additional kernel footprint of any of the competing resource
    management systems is substantially reduced, since it doesn't need
    to provide process grouping/containment, hence improving their
    chances of getting into the kernel

    This patch:

    Add the main task cgroups framework - the cgroup filesystem, and the
    basic structures for tracking membership and associating subsystem state
    objects to tasks.

    Signed-off-by: Paul Menage
    Cc: Serge E. Hallyn
    Cc: "Eric W. Biederman"
    Cc: Dave Hansen
    Cc: Balbir Singh
    Cc: Paul Jackson
    Cc: Kirill Korotaev
    Cc: Herbert Poetzl
    Cc: Srivatsa Vaddagiri
    Cc: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • Fix kernel-api docbook contents problems.

    docproc: linux-2.6.23-git13/include/asm-x86/unaligned_32.h: No such file or directory
    Warning(linux-2.6.23-git13//include/linux/list.h:482): bad line: of list entry
    Warning(linux-2.6.23-git13//mm/filemap.c:864): No description found for parameter 'ra'
    Warning(linux-2.6.23-git13//block/ll_rw_blk.c:3760): No description found for parameter 'req'
    Warning(linux-2.6.23-git13//include/linux/input.h:1077): No description found for parameter 'private'
    Warning(linux-2.6.23-git13//include/linux/input.h:1077): No description found for parameter 'cdev'

    Signed-off-by: Randy Dunlap
    Cc: Jens Axboe
    Cc: WU Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Implement support for file systems larger than 8 TiB.

    The reiserfs superblock contains a 16 bit value for counting the number of
    bitmap blocks. The rest of the disk format supports file systems up to 2^32
    blocks, but the bitmap block limitation artificially limits this to 8 TiB with
    a 4KiB block size.

    Rather than trust the superblock's 16-bit bitmap block count, we calculate it
    dynamically based on the number of blocks in the file system. When an
    incorrect value is observed in the superblock, it is zeroed out, ensuring that
    older kernels will not be able to mount the file system.

    Userspace support has already been implemented and shipped in reiserfsprogs
    3.6.20.

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

    Jeff Mahoney
     
  • The first_zero_hint metadata caching was never actually used, and it's of
    dubious optimization quality. This patch removes it.

    It doesn't actually shrink the size of the reiserfs_bitmap_info struct, since
    that doesn't work with block sizes larger than 8K. There was a big fixme in
    there, and with all the work lately in allowing block size > page size, I
    might as well kill the fixme as well.

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

    Jeff Mahoney
     
  • Do a quick signedness check for block numbers. There are a number of places
    where signed integers are used for block numbers, which limits the usable file
    system size to 8 TiB. The disk format, excepting a problem which will be
    fixed in the following patch, supports file systems up to 16 TiB in size.
    This patch cleans up those sites so that we can enable the full usable size.

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

    Jeff Mahoney
     
  • The jbd-debug file used to be located in /proc/sys/fs/jbd-debug, but
    create_proc_entry() does not do lookups on file names that are more that
    one directory deep. This causes the entry creation to fail and hence, no
    proc file is created.

    Instead of fixing this on procfs might as well move the jbd2-debug file to
    debugfs which would be the preferred location for this kind of tunable.
    The new location is now /sys/kernel/debug/jbd/jbd-debug.

    [akpm@linux-foundation.org: zillions of cleanups]
    Signed-off-by: Jose R. Santos
    Acked-by: Jan Kara
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jose R. Santos
     
  • Remove printk from J_ASSERT to preserve registers during BUG.

    Signed-off-by: Chris Snook
    Cc: "Stephen C. Tweedie"
    Cc: Theodore Ts'o
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Snook
     
  • Some external modules like Speakup need to monitor console output.

    This adds a VT notifier that such modules can use to get console output events:
    allocation, deallocation, writes, other updates (cursor position, switch, etc.)

    [akpm@linux-foundation.org: fix headers_check]
    Signed-off-by: Samuel Thibault
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel Thibault
     
  • There is separate notifier header, but no separate notifier .c file.

    Extract notifier code out of kernel/sys.c which will remain for
    misc syscalls I hope. Merge kernel/die_notifier.c into kernel/notifier.c.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Nobody uses flush_tlb_pgtables anymore, this patch removes all remaining
    traces of it from all archs.

    Signed-off-by: Benjamin Herrenschmidt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • Some blind people use a kernel engine called Speakup which uses hardware
    synthesis to speak what gets displayed on the screen. They use the
    PC keyboard to control this engine (start/stop, accelerate, ...) and
    also need to get keyboard feedback (to make sure to know what they are
    typing, the caps lock status, etc.)

    Up to now, the way it was done was very ugly. Below is a patch to add a
    notifier list for permitting a far better implementation, see ChangeLog
    above for details.

    You may wonder why this can't be done at the input layer. The problem
    is that what people want to monitor is the console keyboard, i.e. all
    input keyboards that got attached to the console, and with the currently
    active keymap (i.e. keysyms, not only keycodes).

    This adds a keyboard notifier that such modules can use to get the keyboard
    events and possibly eat them, at several stages:

    - keycodes: even before translation into keysym.
    - unbound keycodes: when no keysym is bound.
    - unicode: when the keycode would get translated into a unicode character.
    - keysym: when the keycode would get translated into a keysym.
    - post_keysym: after the keysym got interpreted, so as to see the result
    (caps lock, etc.)

    This also provides access to k_handler so as to permit simulation of
    keypresses.

    [akpm@linux-foundation.org: various fixes]
    Signed-off-by: Samuel Thibault
    Cc: Jiri Kosina
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel Thibault
     
  • Declarations go into headers.

    Signed-off-by: Miklos Szeredi
    Cc: Ram Pai
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

19 Oct, 2007

10 commits

  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
    pcnet32: remove private net_device_stats structure
    vortex_up should initialize "err"
    pcnet32: remove compile warnings in non-napi mode
    pcnet32: fix non-napi packet reception
    fix EMAC driver for proper napi_synchronize API
    sky2: shutdown cleanup
    napi_synchronize: waiting for NAPI
    forcedeth msi bugfix
    gianfar: fix obviously wrong #ifdef CONFIG_GFAR_NAPI placement
    fs_enet: Update for API changes
    gianfar: remove orphan struct.
    forcedeth: fix rx-work condition in nv_rx_process_optimized() too

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (37 commits)
    ide: set drive->autotune in ide_pci_setup_ports()
    triflex: always tune PIO
    opti621: always tune PIO
    cy82c693: always tune PIO
    cs5520: always tune PIO
    alim15x3: always tune PIO
    ide: add IDE_HFLAG_LEGACY_IRQS host flag
    ide: add IDE_HFLAG_SERIALIZE host flag
    ide: add IDE_HFLAG_ERROR_STOPS_FIFO host flag
    piix: add DECLARE_ICH_DEV() macro
    pdc202xx_old: add DECLARE_PDC2026X_DEV() macro
    pdc202xx_new: add DECLARE_PDCNEW_DEV() macro
    aec62xx: no need to disable UDMA in ->init_hwif method for ATP850UF
    ide: remove .init_setup from ide_pci_device_t
    serverworks: remove ->init_setup
    scc_pata: remove ->init_setup
    pdc202xx_old: remove ->init_setup
    pdc202xx_new: remove ->init_setup
    hpt366: remove ->init_setup
    cmd64x: remove ->init_setup
    ...

    Linus Torvalds
     
  • Add IDE_HFLAG_LEGACY_IRQS host flag to tell ide_pci_setup_ports() to set
    hwif->irq to legacy IRQ 14/15 (iff hwif->irq is not already set) and convert
    atiixp, piix, serverworks, sis5513 and slc90e66 host drivers to use it.

    While at it:

    * In piix.c add IDE_HFLAGS_PIIX define and don't use ->init_hwif for MPIIX.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add IDE_HFLAG_SERIALIZE host flag to tell ide_pci_setup_ports() to set
    hwif/mate->serialized and convert aec62xx, cs5530 and sc1200 host drivers
    to use it.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add IDE_HFLAG_ERROR_STOPS_FIFO host flag and use it instead
    of hwif->err_stops_fifo. As a side-effect this change fixes
    hwif->err_stops_fifo not being restored by ide_hwif_restore().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Now that all users were fixed we can safely remove it.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ->mwdma_mask and ->swdma_mask to ide_pci_device_t.

    * Set ide_hwif_t DMA masks using DMA masks from ide_pci_device_t in
    setup-pci.c::ide_pci_setup_ports() (iff DMA base is valid and ->init_hwif
    method may still override them).

    * Convert IDE PCI host drivers to use ide_pci_device_t DMA masks.

    While at it:

    * Use ATA_{UDMA,MWDMA,SWDMA}* defines.

    * hpt34x.c: add separate ide_pci_device_t instances for HPT343 and HPT345.

    * serverworks.c: fix DMA masks being set before checking DMA base.

    v2:
    * Add missing masks to DECLARE_GENERIC_PCI_DEV() macro.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add IDE_HFLAG_NO_LBA48[_DMA] host flags, use it instead of hwif->no_lba48[_dma]
    and then remove no longer needed hwif->no_lba48[_dma]. As a side-effect
    this change fixes hwif->no_lba48_dma not being restored by ide_hwif_restore().

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Make ide_pci_device_t.host_flags u32 and add IDE_HFLAG_CS5520 host flag.

    * Pass ide_pci_device_t *d to setup-pci.c::ide_get_or_set_dma_base()
    and use d->name instead of hwif->cds->name.

    * Set IDE_HFLAG_CS5520 host flag in cs5520 host driver and use it in
    ide_get_or_set_dma_base() to find out which PCI BAR to use, remove no longer
    needed cs5520.c::cs5520_init_setup_dma() and ide_pci_device_t.init_setup_dma.

    This fixes PCI bus-mastering not being checked for CS5510/CS5520 hosts.

    v2:
    * It is wrong to check simplex bits on CS5510/CS5520 as v1 did.
    (Noticed by Alan).

    Cc: Alan Cox
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add IDE_HFLAG_NO_{DMA,AUTODMA} host flags. Convert all host drivers using
    ide_pci_device_t to use these flags instead of d->autodma and then remove no
    longer needed d->autodma.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz