09 Sep, 2005

5 commits

  • Some PCI devices (e.g. 3c905B, 3c556B) lose all configuration
    (including BARs) when transitioning from D3hot->D0. This leaves such
    a device in an inaccessible state. The patch below causes the BARs
    to be restored when enabling such a device, so that its driver will
    be able to access it.

    The patch also adds pci_restore_bars as a new global symbol, and adds a
    correpsonding EXPORT_SYMBOL_GPL for that.

    Some firmware (e.g. Thinkpad T21) leaves devices in D3hot after a
    (re)boot. Most drivers call pci_enable_device very early, so devices
    left in D3hot that lose configuration during the D3hot->D0 transition
    will be inaccessible to their drivers.

    Drivers could be modified to account for this, but it would
    be difficult to know which drivers need modification. This is
    especially true since often many devices are covered by the same
    driver. It likely would be necessary to replicate code across dozens
    of drivers.

    The patch below should trigger only when transitioning from D3hot->D0
    (or at boot), and only for devices that have the "no soft reset" bit
    cleared in the PM control register. I believe it is safe to include
    this patch as part of the PCI infrastructure.

    The cleanest implementation of pci_restore_bars was to call
    pci_update_resource. Unfortunately, that does not currently exist
    for the sparc64 architecture. The patch below includes a null
    implemenation of pci_update_resource for sparc64.

    Some have expressed interest in making general use of the the
    pci_restore_bars function, so that has been exported to GPL licensed
    modules.

    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    John W. Linville
     
  • This cleans up some of the #ifdef CONFIG_PCI stuff up, and moves the pci register
    info out to a separate file, where it belongs. Eventually we can stop including
    this file from within pci.h, but lots of code needs to be audited first.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This patch removes CONFIG_PCI_NAMES.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • Make PCI fixup data const, so it'll end up in a r/o section.

    This also fixes the conversion into ECOFF which gets broken by too many
    changes between r/w and r/o sections. Call it a hack but it's a change
    that's correct by itself.

    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    akpm@osdl.org
     
  • Run PCI driver initialization on local node

    Instead of adding messy kmalloc_node()s everywhere run the
    PCI driver probe on the node local to the device.

    This would not have helped for IDE, but should for
    other more clean drivers that do more initialization in probe().
    It won't help for drivers that do most of the work
    on first open (like many network drivers)

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

08 Sep, 2005

35 commits

  • Len Brown
     
  • The problem is that klists claim to provide semantics for safe traversal of
    lists which are being modified. The failure case is when traversal of a
    list causes element removal (a fairly common case). The issue is that
    although the list node is refcounted, if it is embedded in an object (which
    is universally the case), then the object will be freed regardless of the
    klist refcount leading to slab corruption because the klist iterator refers
    to the prior element to get the next.

    The solution is to make the klist take and release references to the
    embedding object meaning that the embedding object won't be released until
    the list relinquishes the reference to it.

    (akpm: fast-track this because it's needed for the 2.6.13 scsi merge)

    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Bottomley
     
  • Linus Torvalds
     
  • Linus Torvalds
     
  • Linus Torvalds
     
  • Linus Torvalds
     
  • There are possible race conditions if probes are placed on routines within the
    kprobes files and routines used by the kprobes. For example if you put probe
    on get_kprobe() routines, the system can hang while inserting probes on any
    routine such as do_fork(). Because while inserting probes on do_fork(),
    register_kprobes() routine grabs the kprobes spin lock and executes
    get_kprobe() routine and to handle probe of get_kprobe(), kprobes_handler()
    gets executed and tries to grab kprobes spin lock, and spins forever. This
    patch avoids such possible race conditions by preventing probes on routines
    within the kprobes file and routines used by kprobes.

    I have modified the patches as per Andi Kleen's suggestion to move kprobes
    routines and other routines used by kprobes to a seperate section
    .kprobes.text.

    Also moved page fault and exception handlers, general protection fault to
    .kprobes.text section.

    These patches have been tested on i386, x86_64 and ppc64 architectures, also
    compiled on ia64 and sparc64 architectures.

    Signed-off-by: Prasanna S Panchamukhi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prasanna S Panchamukhi
     
  • Introduce new ll_rw_block() operation SWRITE meaning that block layer should
    wait for the buffer lock and write-out afterwards. Hence data in buffers at
    the time of call are guaranteed to be submitted to the disk.

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

    Jan Kara
     
  • The corgi keyboard has need of a switch event type with slightly type to the
    input system as recommended by the input maintainer.

    Signed-off-by: Richard Purdie
    Cc: Vojtech Pavlik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     
  • Infrastructure for 4-bit bus transfers with SD cards.

    Signed-off-by: Pierre Ossman
    Cc: Russell King
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Ossman
     
  • Read the SD specific SCR register from the card.

    Signed-off-by: Pierre Ossman
    Cc: Russell King
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Ossman
     
  • Support for the read-only switch on SD cards which must be enforced by the
    host.

    Signed-off-by: Pierre Ossman
    Cc: Russell King
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Ossman
     
  • Support for the Secure Digital protocol in the MMC layer.

    A summary of the legal issues surrounding SD cards, as understood by yours
    truly:

    Members of the Secure Digital Association, hereafter SDA, are required to sign
    a NDA[1] before given access to any specifications. It has been speculated
    that including an SD implementation would forbid these members to redistribute
    Linux. This is the basic problem with SD support so it is unclear if it even
    is a problem since it has no effect on those of us that aren't members.

    The SDA doesn't seem to enforce these rules though since the patches included
    here are based on documentation made public by some of the members. The most
    complete specs[2] are actually released by Sandisk, one of the founding
    companies of the SDA.

    Because of this the NDA is considered a non-issue by most involved in the
    discussions concerning these patches. It might be that the SDA is only
    interested in protecting the so called "secure" bits of SD, which so far
    hasn't been found in any public spec. (The card is split into two sections,
    one "normal" and one "secure" which has an access scheme similar to TPM:s).

    (As a side note, Microsoft is working to make things easier for us since they
    want to be able to include the source code for a SD driver in one of their
    development kits. HP is making sure that the new NDA will allow a Linux
    implementation. So far only the SDIO specs have been opened up[3]. More will
    hopefully follow.)

    [1] http://www.sdcard.org/membership/images/ippolicy.pdf
    [2] http://www.sandisk.com/pdf/oem/ProdManualSDCardv1.9.pdf
    [3] http://www.sdcard.org/sdio/Simplified%20SDIO%20Card%20Specification.pdf

    This patch contains the central parts of the SD support. If no MMC cards are
    found on a bus then the MMC layer proceeds looking for SD cards. Helper
    functions are extended to handle the special needs of SD cards.

    Signed-off-by: Pierre Ossman
    Cc: Russell King
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Ossman
     
  • The IPMI power control function proc_write_chassctrl was badly written, it
    directly used userspace pointers, it assumed that strings were NULL
    terminated, and it used the evil sscanf function. This converts over to
    using the sysctl interface for this data and changes the semantics to be a
    little more logical.

    Signed-off-by: Corey Minyard
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Corey Minyard
     
  • The "null message handler" in the IPMI driver is used in startup and panic
    situations to handle messages. It was only designed to work with messages
    from the local management controller, but in some cases it was used to get
    messages from remote managmenet controllers, and the system would then
    panic. This patch makes the "null message handler" in the IPMI driver more
    general so it works with any kind of message.

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

    Corey Minyard
     
  • The IPMI driver include file needs to include compiler.h so it has definitions
    for __user and such.

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

    Corey Minyard
     
  • IPMI allows multiple IPMB channels on a single interface, and each channel
    might have a different IPMB address. However, the driver has only one IPMB
    address that it uses for everything. This patch adds new IOCTLS and a new
    internal interface for setting per-channel IPMB addresses and LUNs. New
    systems are coming out with support for multiple IPMB channels, and they are
    broken without this patch.

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

    Corey Minyard
     
  • This patch introduces a kzalloc wrapper and converts kernel/ to use it. It
    saves a little program text.

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

    Pekka J Enberg
     
  • This patch adds onboard devices and IPMI BMC discovery into DMI scan code.
    Drivers can use dmi_find_device() function to search for devices by type and
    name.

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

    Andrey Panin
     
  • 64 bit architectures all implement their own compatibility sys_open(),
    when in fact the difference is simply not forcing the O_LARGEFILE
    flag. So use the a common function instead.

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

    Miklos Szeredi
     
  • Extract common code used by ptrace_attach() and may_ptrace_attach()
    into a separate function.

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

    Miklos Szeredi
     
  • Remove unused ia_attr_flags from struct iattr, and related defines.

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

    Miklos Szeredi
     
  • dentry cache uses sophisticated RCU technology (and prefetching if
    available) but touches 2 cache lines per dentry during hlist lookup.

    This patch moves d_hash in the same cache line than d_parent and d_name
    fields so that :

    1) One cache line is needed instead of two.

    2) the hlist_for_each_rcu() prefetching has a chance to bring all the
    needed data in advance, not only the part that includes d_hash.next.

    I also changed one old comment that was wrong for 64bits.

    A further optimisation would be to separate dentry in two parts, one that
    is mostly read, and one writen (d_count/d_lock) to avoid false sharing on
    SMP/NUMA but this would need different field placement depending on 32bits
    or 64bits platform.

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

    Eric Dumazet
     
  • Signed-off-by: John Hawkes
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Hawkes
     
  • Now the real motivation for this cpuset mem_exclusive patch series seems
    trivial.

    This patch keeps a task in or under one mem_exclusive cpuset from provoking an
    oom kill of a task under a non-overlapping mem_exclusive cpuset. Since only
    interrupt and GFP_ATOMIC allocations are allowed to escape mem_exclusive
    containment, there is little to gain from oom killing a task under a
    non-overlapping mem_exclusive cpuset, as almost all kernel and user memory
    allocation must come from disjoint memory nodes.

    This patch enables configuring a system so that a runaway job under one
    mem_exclusive cpuset cannot cause the killing of a job in another such cpuset
    that might be using very high compute and memory resources for a prolonged
    time.

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

    Paul Jackson
     
  • This patch makes use of the previously underutilized cpuset flag
    'mem_exclusive' to provide what amounts to another layer of memory placement
    resolution. With this patch, there are now the following four layers of
    memory placement available:

    1) The whole system (interrupt and GFP_ATOMIC allocations can use this),
    2) The nearest enclosing mem_exclusive cpuset (GFP_KERNEL allocations can use),
    3) The current tasks cpuset (GFP_USER allocations constrained to here), and
    4) Specific node placement, using mbind and set_mempolicy.

    These nest - each layer is a subset (same or within) of the previous.

    Layer (2) above is new, with this patch. The call used to check whether a
    zone (its node, actually) is in a cpuset (in its mems_allowed, actually) is
    extended to take a gfp_mask argument, and its logic is extended, in the case
    that __GFP_HARDWALL is not set in the flag bits, to look up the cpuset
    hierarchy for the nearest enclosing mem_exclusive cpuset, to determine if
    placement is allowed. The definition of GFP_USER, which used to be identical
    to GFP_KERNEL, is changed to also set the __GFP_HARDWALL bit, in the previous
    cpuset_gfp_hardwall_flag patch.

    GFP_ATOMIC and GFP_KERNEL allocations will stay within the current tasks
    cpuset, so long as any node therein is not too tight on memory, but will
    escape to the larger layer, if need be.

    The intended use is to allow something like a batch manager to handle several
    jobs, each job in its own cpuset, but using common kernel memory for caches
    and such. Swapper and oom_kill activity is also constrained to Layer (2). A
    task in or below one mem_exclusive cpuset should not cause swapping on nodes
    in another non-overlapping mem_exclusive cpuset, nor provoke oom_killing of a
    task in another such cpuset. Heavy use of kernel memory for i/o caching and
    such by one job should not impact the memory available to jobs in other
    non-overlapping mem_exclusive cpusets.

    This patch enables providing hardwall, inescapable cpusets for memory
    allocations of each job, while sharing kernel memory allocations between
    several jobs, in an enclosing mem_exclusive cpuset.

    Like Dinakar's patch earlier to enable administering sched domains using the
    cpu_exclusive flag, this patch also provides a useful meaning to a cpuset flag
    that had previously done nothing much useful other than restrict what cpuset
    configurations were allowed.

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

    Paul Jackson
     
  • Add another GFP flag: __GFP_HARDWALL.

    A subsequent "cpuset_zone_allowed" patch will use this flag to mark GFP_USER
    allocations, and distinguish them from GFP_KERNEL allocations.

    Allocations (such as GFP_USER) marked GFP_HARDWALL are constrainted to the
    current tasks cpuset. Other allocations (such as GFP_KERNEL) can steal from
    the possibly larger nearest mem_exclusive cpuset ancestor, if memory is tight
    on every node in the current cpuset.

    This patch collides with Mel Gorman's patch to reduce fragmentation in the
    standard buddy allocator, which adds two GFP flags. This was discussed on
    linux-mm in July. Most likely, one of his flags for user reclaimable memory
    can be the same as my __GFP_HARDWALL flag, under some generic name meaning its
    user address space memory.

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

    Paul Jackson
     
  • People have run into a problem when they do this:

    watch (file1, all_events);
    watch (file2, some_events);

    if file2 is a hard link to file1, some events will be missed because by
    default we replace the mask. The patch below adds a flag IN_MASK_ADD which
    will cause inotify to add to the existing mask if present.

    Signed-off-by: John McCutchan
    Signed-off-by: Robert Love
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John McCutchan
     
  • asm/segment.h varies greatly on different architectures but is clearly
    deprecated. Removing all non-architecture consumers will make it easier
    for us to get ride of asm/segment.h all together.

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

    Kumar Gala
     
  • This patch cleans up a commonly repeated set of changes to the NTP state
    variables by adding two helper inline functions:

    ntp_clear(): Clears the ntp state variables

    ntp_synced(): Returns 1 if the system is synced with a time server.

    This was compile tested for alpha, arm, i386, x86-64, ppc64, s390, sparc,
    sparc64.

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

    john stultz
     
  • struct file cleanup: f_maxcount has an unique value (INT_MAX). Just use
    the hard-wired value.

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

    Eric Dumazet
     
  • There is no do_nanosleep function so kill it's declaration in .

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

    Ralf Baechle
     
  • IRQ_PER_CPU is not used by all architectures. This patch introduces the
    macros ARCH_HAS_IRQ_PER_CPU and CHECK_IRQ_PER_CPU() to avoid the generation
    of dead code in __do_IRQ().

    ARCH_HAS_IRQ_PER_CPU is defined by architectures using IRQ_PER_CPU in their
    include/asm_ARCH/irq.h file.

    Through grepping the tree I found the following architectures currently use
    IRQ_PER_CPU:

    cris, ia64, ppc, ppc64 and parisc.

    Signed-off-by: Karsten Wiese
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Karsten Wiese
     
  • Upgrade the request_firmware_nowait function to not start the hotplug
    action on a firmware update.

    This patch is tested along with dell_rbu driver on i386 and x86-64 systems.

    Signed-off-by: Abhay Salunke
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Abhay Salunke
     
  • Change the /proc/sysvipc/shm|sem|msg files to use the generic seq_file
    implementation for struct ipc_ids.

    Signed-off-by: Mike Waychison
    Cc: Manfred Spraul
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Waychison