08 Sep, 2005

40 commits

  • This adds the necessary changes to ensure that we flush the
    caches correctly with aliasing VIPT caches.

    Signed-off-by: Russell King

    Russell King
     
  • 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
     
  • Linus Torvalds
     
  • Linus Torvalds
     
  • This patch fixes a race condition where in system used to hang or sometime
    crash within minutes when kprobes are inserted on ISR routine and a task
    routine.

    The fix has been stress tested on i386, ia64, pp64 and on x86_64. To
    reproduce the problem insert kprobes on schedule() and do_IRQ() functions
    and you should see hang or system crash.

    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Ananth N Mavinakayanahalli
    Acked-by: Prasanna S Panchamukhi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Keshavamurthy Anil S
     
  • This patch contains the ppc64 architecture specific changes to prevent the
    possible race conditions.

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

    Prasanna S Panchamukhi
     
  • 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
     
  • This patch moves the platform specific Sharp SL-C7x0 LCD code from the
    w100fb driver into a more appropriate place and updates the Corgi code to
    match the new w100fb driver.

    It also updates the corgi touchscreen code to match the new simplified
    interface available from w100fb.

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

    Richard Purdie
     
  • The code w100fb was based on was horribly Sharp SL-C7x0 specific and there
    was little else that could be done as I had no access to anything else with
    a w100 in it. There is no real documentation about this chipset available.

    Ian Molton has access to other platforms with the w100 (Toshiba e-series)
    and so between us, we've improved w100fb and made it platform independent.
    Ian Molton also added support for the very similar w3220 and w3200
    chipsets.

    There are a lot of changes here and it nearly amounts to a rewrite of the
    driver but it has been extensively tested and is being used in preference
    to the original driver in the Zaurus community. I'd therefore like to
    update the mainline code to reflect this.

    Signed-off-by: Richard Purdie
    Acked-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     
  • Add a write protection switch handling code to the PXA MMC driver so
    that platform specific code can provide it if available.

    Signed-off-by: Richard Purdie
    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 memory-leak tracking version of kzalloc for ALSA.

    Signed-off-by: Pekka Enberg
    Cc: Jaroslav Kysela
    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • 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
     
  • This makes sense now that we have asm-powerpc.

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

    Stephen Rothwell
     
  • This patch gathers all the struct flock64 definitions (and the operations),
    puts them under !CONFIG_64BIT and cleans up the arch files.

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

    Stephen Rothwell
     
  • This patch just gathers together all the struct flock definitions except
    xtensa into asm-generic/fcntl.h.

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

    Stephen Rothwell
     
  • This patch puts the most popular of each fcntl operation/flag into
    asm-generic/fcntl.h and cleans up the arch files.

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

    Stephen Rothwell