20 Feb, 2009

2 commits

  • This prepares for a real __alloc_percpu, by adding an alignment argument.
    Only one place uses __alloc_percpu directly, and that's for a string.

    tj: af_inet also uses __alloc_percpu(), update it.

    Signed-off-by: Rusty Russell
    Cc: Christoph Lameter
    Cc: Jens Axboe

    Rusty Russell
     
  • Impact: cleanup

    There are two allocated per-cpu accessor macros with almost identical
    spelling. The original and far more popular is per_cpu_ptr (44
    files), so change over the other 4 files.

    tj: kill percpu_ptr() and update UP too

    Signed-off-by: Rusty Russell
    Cc: mingo@redhat.com
    Cc: lenb@kernel.org
    Cc: cpufreq@vger.kernel.org
    Signed-off-by: Tejun Heo

    Rusty Russell
     

10 Feb, 2009

1 commit

  • ELF core dump is used for both user land core dump and kernel crash
    dump. Depending on architecture, register might need to be accessed
    differently for userland and kernel. Allow architectures to define
    ELF_CORE_COPY_KERNEL_REGS() and use different operation for kernel
    register dump.

    Signed-off-by: Tejun Heo
    Signed-off-by: Ingo Molnar

    Tejun Heo
     

09 Feb, 2009

3 commits


08 Feb, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI PM: make the PM core more careful with drivers using the new PM framework
    PCI PM: Read power state from device after trying to change it on resume
    PCI PM: Do not disable and enable bridges during suspend-resume
    PCI: PCIe portdrv: Simplify suspend and resume
    PCI PM: Fix saving of device state in pci_legacy_suspend
    PCI PM: Check if the state has been saved before trying to restore it
    PCI PM: Fix handling of devices without drivers
    PCI: return error on failure to read PCI ROMs
    PCI: properly clean up ASPM link state on device remove

    Linus Torvalds
     
  • Impact: fix spurious BUG_ON() triggered under load

    module_refcount() isn't reliable outside stop_machine(), as demonstrated
    by Karsten Keil , networking can trigger it under load
    (an inc on one cpu and dec on another while module_refcount() is tallying
    can give false results, for example).

    Almost noone should be using __module_get, but that's another issue.

    Cc: Karsten Keil
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

07 Feb, 2009

2 commits


06 Feb, 2009

4 commits

  • Fix namespace violations by changing non-kconfig CONFIG_ names to CNFG_*.

    Fixes breakage in staging/, which adds a real CONFIG_PANEL.

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

    Randy Dunlap
     
  • With exclusive waiters, every process woken up through the wait queue must
    ensure that the next waiter down the line is woken when it has finished.

    Interruptible waiters don't do that when aborting due to a signal. And if
    an aborting waiter is concurrently woken up through the waitqueue, noone
    will ever wake up the next waiter.

    This has been observed with __wait_on_bit_lock() used by
    lock_page_killable(): the first contender on the queue was aborting when
    the actual lock holder woke it up concurrently. The aborted contender
    didn't acquire the lock and therefor never did an unlock followed by
    waking up the next waiter.

    Add abort_exclusive_wait() which removes the process' wait descriptor from
    the waitqueue, iff still queued, or wakes up the next waiter otherwise.
    It does so under the waitqueue lock. Racing with a wake up means the
    aborting process is either already woken (removed from the queue) and will
    wake up the next waiter, or it will remove itself from the queue and the
    concurrent wake up will apply to the next waiter after it.

    Use abort_exclusive_wait() in __wait_event_interruptible_exclusive() and
    __wait_on_bit_lock() when they were interrupted by other means than a wake
    up through the queue.

    [akpm@linux-foundation.org: coding-style fixes]
    Reported-by: Chris Mason
    Signed-off-by: Johannes Weiner
    Mentored-by: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Matthew Wilcox
    Cc: Chuck Lever
    Cc: Nick Piggin
    Cc: Ingo Molnar
    Cc: ["after some testing"]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Avoid calling copy_from/to_user() with fb_info->lock mutex held in fbmem
    ioctl().

    fb_mmap() is called under mm->mmap_sem (A) held, that also acquires
    fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does
    copy_from/to_user() that might acquire mm->mmap_sem (A), causing a
    deadlock.

    NOTE: it doesn't push down the fb_info->lock in each own driver's
    fb_ioctl(), so there are still potential deadlocks elsewhere.

    Signed-off-by: Andrea Righi
    Cc: Dave Jones
    Cc: "Rafael J. Wysocki"
    Cc: Johannes Weiner
    Cc: Krzysztof Helt
    Cc: Harvey Harrison
    Cc: Stefan Richter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • The swap() macro is accidentally retuning the value of its first argument.
    Change it into a doesn't-return-anything macro before someone goes and
    relies upon this behaviour.

    Signed-off-by: Peter Zijlstra
    Cc: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

05 Feb, 2009

2 commits


04 Feb, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    sunrpc: fix rdma dependencies
    e1000: Fix PCI enable to honor the need_ioport flag
    sgi-xp: link XPNET's net_device_ops to its net_device structure
    pcnet_cs: Fix misuse of the equality operator.
    hso: add new device id's
    dca: redesign locks to fix deadlocks
    cassini/sungem: limit reaches -1, but 0 tested
    net: variables reach -1, but 0 tested
    qlge: bugfix: Add missing netif_napi_del call.
    qlge: bugfix: Add flash offset for second port.
    qlge: bugfix: Fix endian issue when reading flash.
    udp: increments sk_drops in __udp_queue_rcv_skb()
    net: Fix userland breakage wrt. linux/if_tunnel.h
    net: packet socket packet_lookup_frame fix

    Linus Torvalds
     

03 Feb, 2009

12 commits

  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: implement HORKAGE_1_5_GBPS and apply it to WD My Book
    libata: add no penalty retry request for EH device handling routines
    libata: improve probe failure handling
    libata: add @spd_limit to sata_down_spd_limit()
    libata: clear dev->ering in smarter way
    libata: check onlineness before using SPD in sata_down_spd_limit()
    libata: move ata_dev_disable() to libata-eh.c
    libata: fix EH device failure handling
    sata_nv: ck804 has borked hardreset too
    ide/libata: fix ata_id_is_cfa() (take 4)
    libata: fix kernel-doc warnings
    ahci: add a module parameter to ignore the SSS flags for async scanning
    sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742
    [libata] sata_sil: Fix compilation error with libata debugging enabled

    Linus Torvalds
     
  • David S. Miller
     
  • Add kernel-doc notation for @lock:

    include/linux/sched.h:457: No description found for parameter 'lock'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Ingo Molnar

    Randy Dunlap
     
  • 3Gbps is often much more prone to transmission failures. It's usually
    okay to let EH handle speed down after transmission failures but some
    WD My Book drives completely shutdown after certain transmission
    failures and after it only power cycling can revive them. Combined
    with the fact that external drives often end up with cable assembly
    which is longer than usual and more likely to have intervening gender,
    this makes these drives very likely to shutdown under certain
    configurations virtually rendering them unusable.

    This patch implements HOARKGE_1_5_GBPS and applies it to WD My Book
    such that 1.5Gbps is forced once the device is identified.

    Please take a look at the following bz for related reports.

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

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • dev->ering used to be cleared together with the rest of ata_device in
    ata_dev_init() which is called whenever a probing event occurs.
    dev->ering is about to be used to track probing failures so it needs
    to remain persistent over multiple porbing events. This patch
    achieves this by doing the following.

    * Instead of CLEAR_OFFSET, define CLEAR_BEGIN and CLEAR_END and only
    clear between BEGIN and END. ering is moved after END. The split
    of persistent area is to allow hotter items remain at the head.

    * ering is explicitly cleared on ata_dev_disable() and when device
    attach succeeds. So, ering is persistent throug a device's life
    time (unless explicitly cleared of course) and also through periods
    inbetween disablement of an attached device and successful detection
    of the next one.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • When checking for the CFA feature set support, ata_id_is_cfa() tests bit 2 in
    word 82 of the identify data instead the word 83; it also checks the ATA/PI
    version support in the word 80 (which the CompactFlash specifications have as
    reserved), this having no slightest chance to work on the modern CF cards that
    don't have 0x848A in the word 0...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI hotplug: Change link order of pciehp & acpiphp
    PCI hotplug: fakephp: Allocate PCI resources before adding the device
    PCI MSI: Fix undefined shift by 32
    PCI PM: Do not wait for buses in B2 or B3 during resume
    PCI PM: Power up devices before restoring their state
    PCI PM: Fix hibernation breakage on EeePC 701
    PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs
    PCI PM: Fix suspend error paths and testing facility breakage

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
    slub: fix per cpu kmem_cache_cpu array memory leak
    kmalloc: return NULL instead of link failure

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (45 commits)
    V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning
    V4L/DVB (10403): saa7134-alsa: saa7130 doesn't support digital audio
    V4L/DVB (10229): ivtv: fix memory leak
    V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming.
    V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled
    V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo
    V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback.
    V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
    V4L/DVB (10287): af9015: fix second FE
    V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock
    V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff
    V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown
    V4L/DVB (10257): em28xx: Fix for KWorld 330U Board
    V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97
    V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition
    V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use
    V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings.
    V4L/DVB (10243): em28xx: fix compile warning
    V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic
    V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081)
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: add text file detailing queue/ sysfs files
    bio.h: If they MUST be inlined, then use __always_inline
    Fix misleading comment in bio.h
    block: fix inconsistent parenthesisation of QUEUE_FLAG_DEFAULT
    block: fix oops in blk_queue_io_stat()

    Linus Torvalds
     
  • Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is
    using a lot of memory.

    Each 'struct module' contains an [NR_CPUS] array of full cache lines.

    This patch uses existing infrastructure (percpu_modalloc() &
    percpu_modfree()) to allocate percpu space for the refcount storage.

    Instead of wasting NR_CPUS*128 bytes (on i386), we now use
    nr_cpu_ids*sizeof(local_t) bytes.

    On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce
    size of module files by about 2 Mbytes. (1Kb per module)

    Instead of having all refcounters in the same memory node - with TLB misses
    because of vmalloc() - this new implementation permits to have better
    NUMA properties, since each CPU will use storage on its preferred node,
    thanks to percpu storage.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Reported by Andrew Walrond

    Changeset c19e654ddbe3831252f61e76a74d661e1a755530
    ("gre: Add netlink interface") added an include
    of linux/ip.h to linux/if_tunnel.h

    We can't really let that get exposed to userspace
    because this conflicts with types defined in netinet/ip.h
    which userland is almost certainly going to have included
    either explicitly or implicitly.

    So guard this include with a __KERNEL__ ifdef.

    Signed-off-by: David S. Miller

    David S. Miller
     

02 Feb, 2009

3 commits


01 Feb, 2009

2 commits

  • …el/git/tip/linux-2.6-tip

    * 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (90 commits)
    headers_check fix: x86, swab.h
    headers_check fix: x86, sigcontext32.h
    headers_check fix: x86, sigcontext.h
    headers_check fix: x86, ptrace-abi.h
    headers_check fix: x86, mtrr.h
    headers_check fix: x86, mce.h
    headers_check fix: x86, kvm.h
    headers_check fix: x86, e820.h
    headers_check fix: linux/rtnetlink.h
    headers_check fix: linux/nubus.h
    headers_check fix: video/uvesafb.h
    headers_check fix: video/sisfb.h
    headers_check fix: sound/hdsp.h
    headers_check fix: mtd/inftl-user.h
    headers_check fix: linux/virtio_net.h
    headers_check fix: linux/virtio_console.h
    headers_check fix: linux/virtio_blk.h
    headers_check fix: linux/videodev.h
    headers_check fix: linux/video_encoder.h
    headers_check fix: linux/video_decoder.h
    ...

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    hrtimer: prevent negative expiry value after clock_was_set()
    hrtimers: allow the hot-unplugging of all cpus
    hrtimers: increase clock min delta threshold while interrupt hanging

    Linus Torvalds
     

31 Jan, 2009

6 commits

  • Tejun Heo
     
  • Impact: fix linker screwup on x86_32

    Recent x86_64 zerobased patches introduced PERCPU_VADDR() to put
    .data.percpu to a predefined address and re-defined PERCPU() in terms
    of it. The new macro defined one extra symbol, __per_cpu_load, for
    LMA of the section so that the init data could be accessed. This new
    symbol introduced the following problems to x86_32.

    1. If __per_cpu_load is defined outside of .data.percpu as an absolute
    symbol, relocation generation for relocatable kernel fails due to
    absolute relocation.

    2. If __per_cpu_load is put inside .data.percpu with absolute address
    assignment to work around #1, linker gets confused and under
    certain configurations ends up relocating the symbol against
    .data.percpu such that the load address gets added on top of
    already set load address.

    As x86_32 doesn't use predefined address for .data.percpu, there's no
    need for it to care about the possibility of __per_cpu_load being
    different from __per_cpu_start.

    This patch defines PERCPU() separately so that __per_cpu_load is
    defined inside .data.percpu so that everything is ordinary
    linking-wise.

    Signed-off-by: Tejun Heo
    Signed-off-by: Ingo Molnar

    Tejun Heo
     
  • Impact: fix CPU hotplug hang on Power6 testbox

    On architectures that support offlining all cpus (at least powerpc/pseries),
    hot-unpluging the tick_do_timer_cpu can result in a system hang.

    This comes from the fact that if the cpu going down happens to be the
    cpu doing the tick, then as the tick_do_timer_cpu handover happens after the
    cpu is dead (via the CPU_DEAD notification), we're left without ticks,
    jiffies are frozen and any task relying on timers (msleep, ...) is stuck.
    That's particularly the case for the cpu looping in __cpu_die() waiting
    for the dying cpu to be dead.

    This patch addresses this by having the tick_do_timer_cpu handover happen
    earlier during the CPU_DYING notification. For this, a new clockevent
    notification type is introduced (CLOCK_EVT_NOTIFY_CPU_DYING) which is triggered
    in hrtimer_cpu_notify().

    Signed-off-by: Sebastien Dugue
    Cc:
    Signed-off-by: Ingo Molnar

    Sebastien Dugue
     
  • fix the following 'make headers_check' warning:

    usr/include/linux/rtnetlink.h:328: found __[us]{8,16,32,64} type without #include

    Signed-off-by: Jaswinder Singh Rajput

    Jaswinder Singh Rajput
     
  • fix the following 'make headers_check' warning:

    usr/include/linux/nubus.h:232: found __[us]{8,16,32,64} type without #include

    Signed-off-by: Jaswinder Singh Rajput

    Jaswinder Singh Rajput
     
  • fix the following 'make headers_check' warning:

    usr/include/video/uvesafb.h:5: found __[us]{8,16,32,64} type without #include

    Signed-off-by: Jaswinder Singh Rajput

    Jaswinder Singh Rajput