18 Dec, 2006

3 commits


17 Dec, 2006

2 commits

  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
    IB/mthca: Use DEFINE_MUTEX() instead of mutex_init()
    IB/mthca: Add HCA profile module parameters
    IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
    IB: Fix ib_dma_alloc_coherent() wrapper

    Linus Torvalds
     
  • On architectures where the atomicity of the bit operations is handled by
    external means (ie a separate spinlock to protect concurrent accesses),
    just doing a direct assignment on the workqueue data field (as done by
    commit 4594bf159f1962cec3b727954b7c598b07e2e737) can cause the
    assignment to be lost due to lack of serialization with the bitops on
    the same word.

    So we need to serialize the assignment with the locks on those
    architectures (notably older ARM chips, PA-RISC and sparc32).

    So rather than using an "unsigned long", let's use "atomic_long_t",
    which already has a safe assignment operation (atomic_long_set()) on
    such architectures.

    This requires that the atomic operations use the same atomicity locks as
    the bit operations do, but that is largely the case anyway. Sparc32
    will probably need fixing.

    Architectures (including modern ARM with LL/SC) that implement sane
    atomic operations for SMP won't see any of this matter.

    Cc: Russell King
    Cc: David Howells
    Cc: David Miller
    Cc: Matthew Wilcox
    Cc: Linux Arch Maintainers
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

16 Dec, 2006

6 commits

  • Nobody uses it, but it was still wrong. Using the macro argument name
    'work' meant that when we used 'work' as a member name, that would also
    get replaced by the macro argument.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The ib_dma_alloc_coherent() wrapper uses a u64* for the dma_handle
    parameter, unlike dma_alloc_coherent, which uses dma_addr_t*. This
    means that we need a temporary variable to handle the case when
    ib_dma_alloc_coherent() just falls through directly to
    dma_alloc_coherent() on architectures where sizeof u64 != sizeof
    dma_addr_t.

    Signed-off-by: Roland Dreier

    Roland Dreier
     
  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [S390] cio: css_register_subchannel race.
    [S390] Save prefix register for dump on panic
    [S390] Fix reboot hang
    [S390] Fix reboot hang on LPARs
    [S390] sclp_cpi module license.
    [S390] zcrypt: module unload fixes.
    [S390] Hipersocket multicast queue: make sure outbound handler is called
    [S390] hypfs fixes
    [S390] update default configuration

    Linus Torvalds
     
  • It has caused more problems than it ever really solved, and is
    apparently not getting cleaned up and fixed. We can put it back when
    it's stable and isn't likely to make warning or bug events worse.

    In the meantime, enable frame pointers for more readable stack traces.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Reboot hangs on LPARs without diag308 support. The reason for this is,
    that before the reboot is done, the channel subsystem is shut down.
    During the reset on each possible subchannel a "store subchannel" is
    done. This operation can end in a program check interruption, if the
    specified subchannel set is not implemented by the hardware. During
    the reset, currently we do not have a program check handler, which
    leads to the described kernel bug. We install now a new program check
    handler for the reboot code to fix this problem.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • A HiperSocket multicast queue works asynchronously. When sending
    buffers, the buffer state change from PRIMED to EMPTY may happen
    delayed. Reschedule the checking for changes in the outbound queue,
    if there are still PRIMED buffers.

    Signed-off-by: Ursula Braun
    Signed-off-by: Martin Schwidefsky

    Ursula Braun
     

14 Dec, 2006

29 commits

  • At least on PPC, the "op ? op : dma" construct causes a compile failure
    because the dma_* is a do{}while(0) macro.

    This turns all of them into proper if/else to avoid this problem.

    Signed-off-by: Ben Collins
    Signed-off-by: Linus Torvalds

    Ben Collins
     
  • Remove the deferred hooks and all related code as scheduled in
    feature-removal-schedule.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Make fib6_node 'subtree' depend on IPV6_SUBTREES.

    Signed-off-by: Kim Nordlund
    Signed-off-by: David S. Miller

    Kim Nordlund
     
  • Signed-off-by: Ivan Skytte Jorgensen
    Signed-off-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Ivan Skytte Jorgensen
     
  • Currently in SCTP, we maintain a local address list by rebuilding the whole
    list from the device list whenever we get a address add/delete event.

    This patch fixes it by only adding/deleting the address for which we
    receive the event.

    Also removed the sctp_local_addr_lock() which is no longer needed as we
    now use list_for_each_safe() to traverse this list. This fixes the bugs
    in sctp_copy_laddrs_xxx() routines where we do copy_to_user() while
    holding this lock.

    Signed-off-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     
  • To do that, this makes nf_ct_l3proto_try_module_{get,put} compatible
    functions. As a result we can remove '#ifdef' surrounds and direct call of
    need_conntrack().

    Signed-off-by: Yasuyuki Kozakai
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Yasuyuki Kozakai
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 4017/1: [Jornada7xx] - Updating Jornada720.c
    [ARM] 3992/1: i.MX/MX1 CPU Frequency scaling support
    [ARM] Provide a method to alter the control register
    [ARM] 4016/1: prefetch macro is wrong wrt gcc's "delete-null-pointer-checks"
    [ARM] Remove empty fixup function
    [ARM] 4014/1: include drivers/hid/Kconfig
    [ARM] 4013/1: clocksource driver for netx
    [ARM] 4012/1: Clocksource for pxa
    [ARM] Clean up ioremap code
    [ARM] Unuse another Linux PTE bit
    [ARM] Clean up KERNEL_RAM_ADDR
    [ARM] Add sys_*at syscalls
    [ARM] 4004/1: S3C24XX: UDC remove implict addition of VA to regs
    [ARM] Formalise the ARMv6 processor name string
    [ARM] Handle HWCAP_VFP in VFP support code
    [ARM] 4011/1: AT91SAM9260: Fix compilation with NAND driver
    [ARM] 4010/1: AT91SAM9260-EK board: Prepare for MACB Ethernet support

    Linus Torvalds
     
  • * 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] Move sg_dma_{len,address} from pci.h to scatterlist.h

    Linus Torvalds
     
  • platform_device_add_data() makes a copy of the data that is given to it,
    and thus the parameter can be const. This removes a warning when data
    from get_property() on powerpc is handed to platform_device_add_data(),
    as get_property() returns a const pointer.

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

    Scott Wood
     
  • Signed-off-by: Russell King

    Russell King
     
  • IA64 is in a tiny minority providing these defines in pci.h.
    Almost everyone else has them in scatterlist.h

    Signed-off-by: Tony Luck

    Tony Luck
     
  • Support to change MX1 CPU frequency at runtime.
    Tested on PiKRON's PiMX1 board and seems to be fully
    stable up to 200 MHz end even as low as 8 MHz.

    Signed-off-by: Pavel Pisa
    Signed-off-by: Russell King

    Pavel Pisa
     
  • i.MX needs to tweak the control register to support CPU frequency
    scaling. Rather than have folk blindly try and change the control
    register by writing to it and then wondering why it doesn't work,
    provide a method (which is safe for UP only, and therefore only
    available for UP) to achieve this.

    Signed-off-by: Russell King

    Russell King
     
  • optimization

    The gcc manual says:

    |`-fdelete-null-pointer-checks'
    | Use global dataflow analysis to identify and eliminate useless
    | checks for null pointers. The compiler assumes that dereferencing
    | a null pointer would have halted the program. If a pointer is
    | checked after it has already been dereferenced, it cannot be null.
    | Enabled at levels `-O2', `-O3', `-Os'.

    Now the problem can be seen with this test case:

    #include
    extern void bar(char *x);
    void foo(char *x)
    {
    prefetch(x);
    if (x)
    bar(x);
    }

    Because the constraint to the inline asm used in the prefetch() macro is
    a memory operand, gcc assumes that the asm code does dereference the
    pointer and the delete-null-pointer-checks optimization kicks in.
    Inspection of generated assembly for the above example shows that bar()
    is indeed called unconditionally without any test on the value of x.

    Of course in the prefetch case there is no real dereference and it
    cannot be assumed that a null pointer would have been caught at that
    point. This causes kernel oopses with constructs like
    hlist_for_each_entry() where the list's 'next' content is prefetched
    before the pointer is tested against NULL, and only when gcc feels like
    applying this optimization which doesn't happen all the time with more
    complex code.

    It appears that the way to prevent delete-null-pointer-checks
    optimization to occur in this case is to make prefetch() into a static
    inline function instead of a macro. At least this is what is done on
    x86_64 where a similar inline asm memory operand is used (I presume they
    would have seen the same problem if it didn't work) and resulting code
    for the above example confirms that.

    An alternative would consist of replacing the memory operand by a
    register operand containing the pointer, and use the addressing mode
    explicitly in the asm template. But that would be less optimal than an
    offsettable memory reference.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Russell King

    Nicolas Pitre
     
  • Oops, sorry about that.

    Signed-off-by: Linus Torvalds

    Russell King
     
  • Virtually index, physically tagged cache architectures can get away
    without cache flushing when forking. This patch adds a new cache
    flushing function flush_cache_dup_mm(struct mm_struct *) which for the
    moment I've implemented to do the same thing on all architectures
    except on MIPS where it's a no-op.

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

    Ralf Baechle
     
  • Provide a custom copy_user_highpage() to deal with aliasing issues on
    MIPS. It uses kmap_coherent() to map an user page for kernel with same
    color. Rewrite copy_to_user_page() and copy_from_user_page() with the
    new interfaces to avoid extra cache flushing.

    The main part of this patch was originally written by Ralf Baechle;
    Atushi Nemoto did the the debugging.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: Ralf Baechle
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • To allow a more effective copy_user_highpage() on certain architectures,
    a vma argument is added to the function and cow_user_page() allowing
    the implementation of these functions to check for the VM_EXEC bit.

    The main part of this patch was originally written by Ralf Baechle;
    Atushi Nemoto did the the debugging.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: Ralf Baechle
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • Problem:

    1. There is a process containing two thread (T1 and T2). The
    thread T1 calls fork(). Then dup_mmap() function called on T1 context.

    static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
    ...
    flush_cache_mm(current->mm);
    ... /* A */
    (write-protect all Copy-On-Write pages)
    ... /* B */
    flush_tlb_mm(current->mm);
    ...

    2. When preemption happens between A and B (or on SMP kernel), the
    thread T2 can run and modify data on COW pages without page fault
    (modified data will stay in cache).

    3. Some time after fork() completed, the thread T2 may cause a page
    fault by write-protect on a COW page.

    4. Then data of the COW page will be copied to newly allocated
    physical page (copy_cow_page()). It reads data via kernel mapping.
    The kernel mapping can have different 'color' with user space
    mapping of the thread T2 (dcache aliasing). Therefore
    copy_cow_page() will copy stale data. Then the modified data in
    cache will be lost.

    In order to allow architecture code to deal with this problem allow
    architecture code to override copy_user_highpage() by defining
    __HAVE_ARCH_COPY_USER_HIGHPAGE in .

    The main part of this patch was originally written by Ralf Baechle;
    Atushi Nemoto did the the debugging.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: Ralf Baechle
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • * 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    hwmon: Add MAINTAINERS entry for new ams driver
    hwmon: New AMS hardware monitoring driver
    hwmon/w83793: Add documentation and maintainer
    hwmon: New Winbond W83793 hardware monitoring driver
    hwmon: Update Rudolf Marek's e-mail address
    hwmon/f71805f: Fix the device address decoding
    hwmon/f71805f: Always create all fan inputs
    hwmon/f71805f: Add support for the Fintek F71872F/FG chip
    hwmon: New PC87427 hardware monitoring driver
    hwmon/it87: Remove the SMBus interface support
    hwmon/hdaps: Update the list of supported devices
    hwmon/hdaps: Move the DMI detection data to .data
    hwmon/pc87360: Autodetect the VRM version
    hwmon/f71805f: Document the fan control features
    hwmon/f71805f: Add support for "speed mode" fan speed control
    hwmon/f71805f: Support DC fan speed control mode
    hwmon/f71805f: Let the user adjust the PWM base frequency
    hwmon/f71805f: Add manual fan speed control
    hwmon/f71805f: Store the fan control registers

    Linus Torvalds
     
  • Run this:

    #!/bin/sh
    for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
    echo "De-casting $f..."
    perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
    done

    And then go through and reinstate those cases where code is casting pointers
    to non-pointers.

    And then drop a few hunks which conflicted with outstanding work.

    Cc: Russell King , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Modify the sstfb (Voodoo1/2) driver:

    - fix a memleak when removing the sstfb module

    - fix sstfb to use the fbdev default videomode database

    - add module option "mode_option" to set initial screen mode

    - add sysfs-interface to turn VGA-passthrough on/off via
    /sys/class/graphics/fbX/vgapass

    - remove old debug functions from ioctl interface

    Signed-off-by: Helge Deller
    Acked-By: James Simmons
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Helge Deller
     
  • Remove references to non-existent fbmon_valid_timings()

    Signed-off-by: Geert Uytterhoeven
    Cc: James Simmons
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • Define an op descriptor struct, use it to simplify nfsd4_proc_compound().

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • Tuck away the replay_owner in the cstate while we're at it.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • Pass the saved and current filehandles together into all the nfsd4 compound
    operations.

    I want a unified interface to these operations so we can just call them by
    pointer and throw out the huge switch statement.

    Also I'll eventually want a structure like this--that holds the state used
    during compound processing--for deferral.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • A comment here incorrectly states that "slack_space" is measured in words, not
    bytes. Remove the comment, and adjust a variable name and a few comments to
    clarify the situation.

    This is pure cleanup; there should be no change in functionality.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • The BLK_DEV_SWIM_IOP driver has:
    - already been marked as BROKEN in 2.6.0 three years ago and
    - is still marked as BROKEN.

    Drivers that had been marked as BROKEN for such a long time seem to be
    unlikely to be revived in the forseeable future.

    But if anyone wants to ever revive this driver, the code is still
    present in the older kernel releases.

    Signed-off-by: Adrian Bunk
    Cc: Jens Axboe
    Acked-by: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • This patch converts the tracking of the user space watchdog process from using
    a pid_t to use struct pid. This makes us safe from pid wrap around issues and
    prepares the way for the pid namespace.

    Signed-off-by: Eric W. Biederman
    Cc: Petr Vandrovec
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman