15 Jan, 2008

6 commits

  • Quicklists calculates the size of the quicklists based on the number of
    free pages. This must be the number of free pages that can be allocated
    with GFP_KERNEL. node_page_state() includes the pages in ZONE_HIGHMEM and
    ZONE_MOVABLE which may lead the quicklists to become too large causing OOM.

    Signed-off-by: Christoph Lameter
    Tested-by: Dhaval Giani
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • - MAINTAINERS email update
    - add atmel_lcdfb entry

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

    Nicolas Ferre
     
  • The savestate command structure was being overwritten by the result of
    running the TPM_SaveState command after one run, so make it a local
    variable to the function instead of a global variable that gets
    overwritten.

    Acked-by: Pavel Machek
    Cc: Kent Yoder
    Cc: Marcel Selhorst
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Smith
     
  • Sometimes cpu_idle_wait gets stuck because it might miss CPUS that are
    already in idle, have no tasks waiting to run and have no interrupts going
    to them. This is common on bootup when switching cpu idle governors.

    This patch gives those CPUS that don't check in an IPI kick.

    Background:
    -----------
    I notice this while developing the mcount patches, that every once in a
    while the system would hang. Looking deeper, the hang was always at boot
    up when registering init_menu of the cpu_idle menu governor. Talking
    with Thomas Gliexner, we discovered that one of the CPUS had no timer
    events scheduled for it and it was in idle (running with NO_HZ). So the
    CPU would not set the cpu_idle_state bit.

    Hitting sysrq-t a few times would eventually route the interrupt to the
    stuck CPU and the system would continue.

    Note, I would have used the PDA isidle but that is set after the
    cpu_idle_state bit is cleared, and would leave a window open where we
    may miss being kicked.

    hmm, looking closer at this, we still have a small race window between
    clearing the cpu_idle_state and disabling interrupts (hence the RFC).

    CPU0: CPU 1:
    --------- ---------
    cpu_idle_wait(): cpu_idle():
    | __cpu_cpu_var(is_idle) = 1;
    | if (__get_cpu_var(cpu_idle_state)) /* == 0 */
    per_cpu(cpu_idle_state, 1) = 1; |
    if (per_cpu(is_idle, 1)) /* == 1 */ |
    smp_call_function(1) |
    | receives ipi and runs do_nothing.
    wait on map == empty idle();
    /* waits forever */

    So really we need interrupts off for most of this then. One might think
    that we could simply clear the cpu_idle_state from do_nothing, but I'm
    assuming that cpu_idle governors can be removed, and this might cause a
    race that a governor might be used after the module was removed.

    Venki said:

    I think your RFC patch is the right solution here. As I see it, there is
    no race with your RFC patch. As long as you call a dummy smp_call_function
    on all CPUs, we should be OK. We can get rid of cpu_idle_state and the
    current wait forever logic altogether with dummy smp_call_function. And so
    there wont be any wait forever scenario.

    The whole point of cpu_idle_wait() is to make all CPUs come out of idle
    loop atleast once. The caller will use cpu_idle_wait something like this.

    // Want to change idle handler

    - Switch global idle handler to always present default_idle

    - call cpu_idle_wait so that all cpus come out of idle for an instant
    and stop using old idle pointer and start using default idle

    - Change the idle handler to a new handler

    - optional cpu_idle_wait if you want all cpus to start using the new
    handler immediately.

    Maybe the below 1s patch is safe bet for .24. But for .25, I would say we
    just replace all complicated logic by simple dummy smp_call_function and
    remove cpu_idle_state altogether.

    Signed-off-by: Steven Rostedt
    Cc: Venkatesh Pallipadi
    Acked-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Cc: Andi Kleen
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     
  • Decrement the slave counter only in ->release() callback instead of both
    in ->release() and w1 control.

    Patch is based on debug work and preliminary patch made by Henri Laakso.
    Henri noticed in debug that this counter becomes negative after w1 slave
    device is physically removed.

    Signed-off-by: Evgeniy Polyakov
    Cc: Henri Laakso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     
  • Kyle McMartin reports sysrq_timer_list_show() can hit the module mutex
    from hard interrupt context. These paths don't need to though, since we
    long ago changed all the module list manipulation to occur via
    stop_machine().

    Disabling preemption is enough.

    Signed-off-by: Rusty Russell
    Cc: Ingo Molnar
    Cc: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

14 Jan, 2008

6 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] vfp: fix fuitod/fsitod instructions
    [ARM] pxa: silence warnings from cpu_is_xxx() macros

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
    spidernet MAINTAINERship update
    sky2: remove check for PCI wakeup setting from BIOS
    sky2: large memory workaround.
    fs_enet: check for phydev existence in the ethtool handlers
    [usb netdev] asix: fix regression
    r8169: fix missing loop variable increment
    ip1000: menu location change
    Fixed a small typo in the loopback driver
    3c509: PnP resource management fix
    netxen: fix byte-swapping in tx and rx
    netxen: optimize tx handling
    netxen: stop second phy correctly
    netxen: update driver version
    netxen: update MAINTAINERS
    endianness noise in tulip_core
    de4x5 fixes
    xircom_cb endianness fixes
    rt2x00: Put 802.11 data on 4 byte boundary
    rt2x00: Corectly initialize rt2500usb MAC
    rt2x00: Allow rt61 to catch up after a missing tx report

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    [POWERPC] Fix CPU hotplug when using the SLB shadow buffer
    [POWERPC] efika: add phy-handle property for fec_mpc52xx

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    pnpacpi: print resource shortage message only once
    PM: ACPI and APM must not be enabled at the same time
    ACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9
    ACPICA: fix acpi_serialize hang regression
    ACPI : Not register gsi for PCI IDE controller in legacy mode
    ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE case
    ACPI: Make sysfs interface in ACPI power optional.
    ACPI: EC: Enable boot EC before bus_scan
    increase PNP_MAX_PORT to 40 from 24

    Linus Torvalds
     
  • When RPCSEC/GSS and krb5i is used, requests are padded, typically to a multiple
    of 8 bytes. This can make the request look slightly longer than it
    really is.

    As of

    f34b95689d2ce001c "The NFSv2/NFSv3 server does not handle zero
    length WRITE request correctly",

    the xdr decode routines for NFSv2 and NFSv3 reject requests that aren't
    the right length, so krb5i (for example) WRITE requests can get lost.

    This patch relaxes the appropriate test and enhances the related comment.

    Signed-off-by: Neil Brown
    Signed-off-by: J. Bruce Fields
    Cc: Peter Staubach
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • task_ppid_nr_ns is called in three places. One of these should never
    have called it. In the other two, using it broke the existing
    semantics. This was presumably accidental. If the function had not
    been there, it would have been much more obvious to the eye that those
    patches were changing the behavior. We don't need this function.

    In task_state, the pid of the ptracer is not the ppid of the ptracer.

    In do_task_stat, ppid is the tgid of the real_parent, not its pid.
    I also moved the call outside of lock_task_sighand, since it doesn't
    need it.

    In sys_getppid, ppid is the tgid of the real_parent, not its pid.

    Signed-off-by: Roland McGrath
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

13 Jan, 2008

21 commits

  • Len Brown
     
  • pnpacpi: exceeded the max number of IO resources: 40

    While this message is a real error and should thus
    remain KERN_ERR (even a new dmesg line is seen as a regression
    by some, since it was not printed in 2.6.23...) it is certainly
    impolite to print this warning 50 times should you happen to
    have the oddball system with 90 io resources under a device...

    So print the warning just once.

    In 2.6.25 we'll get rid of the limits altogether
    and these warnings will vanish with them.

    http://bugzilla.kernel.org/show_bug.cgi?id=9535

    Signed-off-by: Len Brown

    Len Brown
     
  • Acked-by: Linas Vepstas
    Signed-off-by: Jeff Garzik

    Jens Osterkamp
     
  • The driver checks status of PCI power management to mark
    default setting of Wake On Lan. On some systems this works, but often
    it reports a that WOL is disabled when it isn't.

    This patch gets rid of that check and just reports the wake on
    lan status based on the hardware capablity.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • This patch might fix problems with 4G or more of memory.
    It stops the driver from doing a small optimization for Tx and Rx,
    and instead always sets the high-page on tx/rx descriptors.

    Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9725

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • Way back when (in commit 834f2a4a1554dc5b2598038b3fe8703defcbe467, aka
    "VFS: Allow the filesystem to return a full file pointer on open intent"
    to be exact), Trond changed the open logic to keep track of the original
    flags to a file open, in order to pass down the the intent of a dentry
    lookup to the low-level filesystem.

    However, when doing that reorganization, it changed the meaning of
    namei_flags, and thus inadvertently changed the test of access mode for
    directories (and RO filesystem) to use the wrong flag. So fix those
    test back to use access mode ("acc_mode") rather than the open flag
    ("flag").

    Issue noticed by Bill Roman at Datalight.

    Reported-and-tested-by: Bill Roman
    Acked-by: Trond Myklebust
    Acked-by: Al Viro
    Cc: Christoph Hellwig
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Otherwise oops will happen if ethernet device has not been opened:

    Unable to handle kernel paging request for data at address 0x0000014c
    Faulting instruction address: 0xc016f7f0
    Oops: Kernel access of bad area, sig: 11 [#1]
    MPC85xx
    NIP: c016f7f0 LR: c01722a0 CTR: 00000000
    REGS: c79ddc70 TRAP: 0300 Not tainted (2.6.24-rc3-g820a386b)
    MSR: 00029000 CR: 20004428 XER: 20000000
    DEAR: 0000014c, ESR: 00000000
    TASK = c789f5e0[999] 'snmpd' THREAD: c79dc000
    GPR00: c01aceb8 c79ddd20 c789f5e0 00000000 c79ddd3c 00000000 c79ddd64 00000000
    GPR08: 00000000 c7845b60 c79dde3c c01ace80 20004422 200249fc 000002a0 100da728
    GPR16: 100c0000 00000000 00000000 00000000 20022078 00000009 200220e0 bfc85558
    GPR24: c79ddd3c 00000000 00000000 c02e0e70 c022fc64 ffffffff c7845800 bfc85498
    NIP [c016f7f0] phy_ethtool_gset+0x0/0x4c
    LR [c01722a0] fs_get_settings+0x18/0x28
    Call Trace:
    [c79ddd20] [c79dde38] 0xc79dde38 (unreliable)
    [c79ddd30] [c01aceb8] dev_ethtool+0x294/0x11ec
    [c79dde30] [c01aaa44] dev_ioctl+0x454/0x6a8
    [c79ddeb0] [c019b9d4] sock_ioctl+0x84/0x230
    [c79dded0] [c007ded8] do_ioctl+0x34/0x8c
    [c79ddee0] [c007dfbc] vfs_ioctl+0x8c/0x41c
    [c79ddf10] [c007e38c] sys_ioctl+0x40/0x74
    [c79ddf40] [c000d4c0] ret_from_syscall+0x0/0x3c
    Instruction dump:
    81630000 800b0030 2f800000 419e0010 7c0803a6 4e800021 7c691b78 80010014
    7d234b78 38210010 7c0803a6 4e800020 7c6b1b78 38600000 90040004

    Signed-off-by: Anton Vorontsov
    Acked-by: Vitaly Bordug
    Signed-off-by: Jeff Garzik

    Anton Vorontsov
     
  • …nville/wireless-2.6 into upstream-fixes

    Jeff Garzik
     
  • 51bf2976b55d07f9daae9697a0a3ac9f58abcedc caused a regression in the asix
    usbnet driver. usb_control_msg returns the number of bytes read on
    success, not 0. Tested with NETGEAR FA120.

    Signed-off-by: Russ Dill
    Signed-off-by: Jeff Garzik

    Russ Dill
     
  • Spotted-by: Citizen Lee
    Signed-off-by: Francois Romieu
    Signed-off-by: Jeff Garzik

    Francois Romieu
     
  • Move the ip1000 driver into the expected place for gigabit cards
    in the configuration menu structure. It should be under the gigabit
    cards, not at the top level.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • This is probably a result of the changes from commit
    854d836 - [NET]: Dynamically allocate the loopback device, part 2

    Signed-off-by: Emil Medve
    Signed-off-by: Jeff Garzik

    Emil Medve
     
  • In order to release PnP resources a card type must be set to EL3_PNP.
    Previously, it was never set hence the PnP resources were not
    released and device was left in incorrect state.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Jeff Garzik

    Krzysztof Helt
     
  • Here's the reworked patch.

    This cleans up some unnecessary byte-swapping while setting up tx and
    interpreting rx desc. The 64 bit rx status data should be converted
    to host endian format only once and the macros just need to extract
    bitfields.

    This saves a spate of interrupts on pseries blades caused by buggy
    (non) processing rx status ring.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: Jeff Garzik

    Dhananjay Phadke
     
  • netxen driver allows limited number of threads simultaneously posting
    skb's in tx ring. If transmit slot is unavailable, driver calls
    schedule() or loops in xmit_frame().

    This patch returns TX_BUSY and lets the stack reschedule the packet if
    transmit slot is unavailable. Also removes unnecessary check for tx
    timeout in the driver itself, the network stack does that anyway.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: Jeff Garzik

    dhananjay@netxen.com
     
  • This patch fixes bug that doesn't quiesce second port when interface is
    brought down, which could lead to unwarranted interrupt during rmmod /
    ifdown.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: Jeff Garzik

    dhananjay@netxen.com
     
  • Bumping up driver version to 3.4.18, several fixes have gone in since
    version 3.4.2.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: Jeff Garzik

    dhananjay@netxen.com
     
  • Changing MAINTAINERS for netxen nic driver.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: Jeff Garzik

    dhananjay@netxen.com
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • * (trivial) endianness annotations
    * don't bother with del_timer() from the inside of timer handler itself
    * disable_ast() really ought to do del_timer_sync(), not del_timer()
    * clean the timer handling in general.

    Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • * descriptors inside the rx and tx rings are l-e
    * don't cpu_to_le32() the argument of outl()

    Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     

12 Jan, 2008

7 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
    V4L/DVB (7001): av7110: fix section mismatch
    V4L/DVB (6999): ivtv: stick to udelay=10 after all

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
    [XFS] fix unaligned access in readdir

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.24:
    sh: Force __access_ok() to obey address space limit.
    sh: Fix argument page dcache flushing regression.

    Linus Torvalds
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    [MIPS] Replace 40c7869b693b18412491fdcff64682215b739f9e kludge
    [MIPS] Lasat: Fix built in separate object directory.
    [MIPS] Malta: Fix software reset on big endian
    [MIPS] pnx8xxx: move to clocksource
    [MIPS] Wrong CONFIG option prevents setup of DMA zone.

    Linus Torvalds
     
  • Since the introduction of the acquire_console_sem calls in
    0333d83509c7d8496c8965b5ba9bc0c98e83c259, kexecing can cause the
    kernel to deadlock:

    ps3fb_shutdown()
    -> unregister_framebuffer()
    -> fb_notifier_call_chain(FB_EVENT_FB_UNBIND)
    -> fbcon_fb_unbind()
    -> unbind_con_driver()
    -> bind_con_driver()
    [ acquires console_sem ]
    -> fbcon_deinit()
    -> fbops->fb_release(newinfo, 0)
    -> ps3fb_release()
    -> ps3fb_sync()
    [ acquires console_sem ]

    This change avoids the deadlock by moving the acquire_console_sem()
    out of ps3fb_sync(), and puts it into the two other callsites, leaving
    ps3fb_release() to call ps3fb_sync() without the console semaphore.

    [Geert]
    - Corrected call sequence above
    - ps3fb_release() may be called with and without console_sem held. This is an
    inconsistency that should be fixed at the fb level, but for now, try to
    acquire console_sem in ps3fb_release().

    I think it's safer to let ps3fb_release() try to acquire console_sem and
    not refresh the screen if it fails, than to call ps3fb_sync() without
    holding console_sem, as ps3fb_par may be modified at the same time, causing
    crashes or lockups.

    Besides, ps3fb_release() only calls ps3fb_sync() to refresh the screen
    when display flipping is disabled, which is an uncommon case (except during
    shutdown/kexec).

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Geert Uytterhoeven
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Jeremy Kerr
     
  • In ps3fb_shutdown, freeing the framebuffer will cause fb_info (in
    dev->core.driver_data) to be free()ed, which we potentially access
    from the ps3fbd kthread.

    This change frees the framebuffer after stopping the ps3fbd kthread.

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Jeremy Kerr
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    blktrace: kill the unneeded initcall
    block: fix blktrace timestamps
    loop: fix bad bio_alloc() nr_iovec request
    Don't blatt first element of prv in sg_chain()

    Linus Torvalds