23 Feb, 2009

2 commits


22 Feb, 2009

2 commits

  • * hibernate:
    PM: Fix suspend_console and resume_console to use only one semaphore
    PM: Wait for console in resume
    PM: Fix pm_notifiers during user mode hibernation
    swsusp: clean up shrink_all_zones()
    swsusp: dont fiddle with swappiness
    PM: fix build for CONFIG_PM unset
    PM/hibernate: fix "swap breaks after hibernation failures"
    PM/resume: wait for device probing to finish
    Consolidate driver_probe_done() loops into one place

    Linus Torvalds
     
  • there's a few places that currently loop over driver_probe_done(), and
    I'm about to add another one. This patch abstracts it into a helper
    to reduce duplication.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Rafael J. Wysocki
    Cc: Len Brown
    Acked-by: Greg KH
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

21 Feb, 2009

4 commits

  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (26 commits)
    drm/radeon: update sarea copies of last_ variables on resume.
    drm/i915: Keep refs on the object over the lifetime of vmas for GTT mmap.
    drm/i915: take struct mutex around fb unref
    drm: Use spread spectrum when the bios tells us it's ok.
    drm: Collapse identical i8xx_clock() and i9xx_clock().
    drm: Bring PLL limits in sync with DDX values.
    drm: Add locking around cursor gem operations.
    drm: Propagate failure from setting crtc base.
    drm: Check for a NULL encoder when reverting on error path
    drm/i915: Cleanup the hws on ringbuffer constrution failure.
    drm/i915: Don't add panel_fixed_mode to the probed modes list at LVDS init.
    drm: Release user fbs in drm_release
    drm/i915: Unpin the fb on error during construction.
    drm/i915: Unpin the hws if we fail to kmap.
    drm/i915: Unpin the ringbuffer if we fail to ioremap it.
    drm/i915: unpin for an invalid memory domain.
    drm/i915: Release and unlock on mmap_gtt error path.
    drm/i915: Set framebuffer alignment based upon the fence constraints.
    drm: Do not leak a new reference for flink() on an existing name
    drm/i915: Fix potential AB-BA deadlock in i915_gem_execbuffer()
    ...

    Linus Torvalds
     
  • Intel 8257x Ethernet boards have a feature called Serial Over Lan.

    This feature works by emulating a serial port, and it is detected by
    kernel as a normal 8250 port. However, this emulation is not perfect, as
    also noticed on changeset 7500b1f602aad75901774a67a687ee985d85893f.

    Before this patch, the kernel were trying to check if the serial TX is
    capable of work using IRQ's.

    This were done with a code similar this:

    serial_outp(up, UART_IER, UART_IER_THRI);
    lsr = serial_in(up, UART_LSR);
    iir = serial_in(up, UART_IIR);
    serial_outp(up, UART_IER, 0);

    if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT)
    up->bugs |= UART_BUG_TXEN;

    This works fine for other 8250 ports, but, on 8250-emulated SoL port, the
    chip is a little lazy to down UART_IIR_NO_INT at UART_IIR register.

    Due to that, UART_BUG_TXEN is sometimes enabled. However, as TX IRQ keeps
    working, and the TX polling is now enabled, the driver miss-interprets the
    IRQ received later, hanging up the machine until a key is pressed at the
    serial console.

    This is the 6 version of this patch. Previous versions were trying to
    introduce a large enough delay between serial_outp and serial_in(up,
    UART_IIR), but not taking forever. However, the needed delay couldn't be
    safely determined.

    At the experimental tests, a delay of 1us solves most of the cases, but
    still hangs sometimes. Increasing the delay to 5us was better, but still
    doesn't solve. A very high delay of 50 ms seemed to work every time.

    However, poking around with delays and pray for it to be enough doesn't
    seem to be a good approach, even for a quirk.

    So, instead of playing with random large arbitrary delays, let's just
    disable UART_BUG_TXEN for all SoL ports.

    [akpm@linux-foundation.org: fix warnings]
    Signed-off-by: Mauro Carvalho Chehab
    Cc: Alan Cox
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mauro Carvalho Chehab
     
  • This adds more documentation of the lowlevel API to avoid future bugs.

    Signed-off-by: Michael Buesch
    Acked-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Buesch
     
  • kzfree() is a wrapper for kfree() that additionally zeroes the underlying
    memory before releasing it to the slab allocator.

    Currently there is code which memset()s the memory region of an object
    before releasing it back to the slab allocator to make sure
    security-sensitive data are really zeroed out after use.

    These callsites can then just use kzfree() which saves some code, makes
    users greppable and allows for a stupid destructor that isn't necessarily
    aware of the actual object size.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Pekka Enberg
    Cc: Matt Mackall
    Acked-by: Christoph Lameter
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

20 Feb, 2009

3 commits


19 Feb, 2009

11 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: fix deadlock in blk_abort_queue() for drivers that readd to timeout list
    block: fix booting from partitioned md array
    block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
    cciss: PCI power management reset for kexec
    paride/pg.c: xs(): &&/|| confusion
    fs/bio: bio_alloc_bioset: pass right object ptr to mempool_free
    block: fix bad definition of BIO_RW_SYNC
    bsg: Fix sense buffer bug in SG_IO

    Linus Torvalds
     
  • Since I don't work for SUSE any more and the bwalle@suse.de address is
    invalid, correct it in the copyright headers and documentation.

    Signed-off-by: Bernhard Walle
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle
     
  • I have a Digi Neo 8 PCI card (114f:00b1) Serial controller: Digi
    International Digi Neo 8 (rev 05)

    that works with the jsm driver after using the following patch.

    Signed-off-by: Adam Lackorzynski
    Cc: Scott H Kilau
    Cc: Wendy Xiong
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adam Lackorzynski
     
  • Now, early_pfn_in_nid(PFN, NID) may returns false if PFN is a hole.
    and memmap initialization was not done. This was a trouble for
    sparc boot.

    To fix this, the PFN should be initialized and marked as PG_reserved.
    This patch changes early_pfn_in_nid() return true if PFN is a hole.

    Signed-off-by: KAMEZAWA Hiroyuki
    Reported-by: David Miller
    Tested-by: KOSAKI Motohiro
    Cc: Mel Gorman
    Cc: Heiko Carstens
    Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • What's happening is that the assertion in mm/page_alloc.c:move_freepages()
    is triggering:

    BUG_ON(page_zone(start_page) != page_zone(end_page));

    Once I knew this is what was happening, I added some annotations:

    if (unlikely(page_zone(start_page) != page_zone(end_page))) {
    printk(KERN_ERR "move_freepages: Bogus zones: "
    "start_page[%p] end_page[%p] zone[%p]\n",
    start_page, end_page, zone);
    printk(KERN_ERR "move_freepages: "
    "start_zone[%p] end_zone[%p]\n",
    page_zone(start_page), page_zone(end_page));
    printk(KERN_ERR "move_freepages: "
    "start_pfn[0x%lx] end_pfn[0x%lx]\n",
    page_to_pfn(start_page), page_to_pfn(end_page));
    printk(KERN_ERR "move_freepages: "
    "start_nid[%d] end_nid[%d]\n",
    page_to_nid(start_page), page_to_nid(end_page));
    ...

    And here's what I got:

    move_freepages: Bogus zones: start_page[2207d0000] end_page[2207dffc0] zone[fffff8103effcb00]
    move_freepages: start_zone[fffff8103effcb00] end_zone[fffff8003fffeb00]
    move_freepages: start_pfn[0x81f600] end_pfn[0x81f7ff]
    move_freepages: start_nid[1] end_nid[0]

    My memory layout on this box is:

    [ 0.000000] Zone PFN ranges:
    [ 0.000000] Normal 0x00000000 -> 0x0081ff5d
    [ 0.000000] Movable zone start PFN for each node
    [ 0.000000] early_node_map[8] active PFN ranges
    [ 0.000000] 0: 0x00000000 -> 0x00020000
    [ 0.000000] 1: 0x00800000 -> 0x0081f7ff
    [ 0.000000] 1: 0x0081f800 -> 0x0081fe50
    [ 0.000000] 1: 0x0081fed1 -> 0x0081fed8
    [ 0.000000] 1: 0x0081feda -> 0x0081fedb
    [ 0.000000] 1: 0x0081fedd -> 0x0081fee5
    [ 0.000000] 1: 0x0081fee7 -> 0x0081ff51
    [ 0.000000] 1: 0x0081ff59 -> 0x0081ff5d

    So it's a block move in that 0x81f600-->0x81f7ff region which triggers
    the problem.

    This patch:

    Declaration of early_pfn_to_nid() is scattered over per-arch include
    files, and it seems it's complicated to know when the declaration is used.
    I think it makes fix-for-memmap-init not easy.

    This patch moves all declaration to include/linux/mm.h

    After this,
    if !CONFIG_NODES_POPULATES_NODE_MAP && !CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
    -> Use static definition in include/linux/mm.h
    else if !CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
    -> Use generic definition in mm/page_alloc.c
    else
    -> per-arch back end function will be called.

    Signed-off-by: KAMEZAWA Hiroyuki
    Tested-by: KOSAKI Motohiro
    Reported-by: David Miller
    Cc: Mel Gorman
    Cc: Heiko Carstens
    Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • The conversion of atmel-mci to dma_request_channel missed the
    initialization of the channel dma_slave information. The filter_fn passed
    to dma_request_channel is responsible for initializing the channel's
    private data. This implementation has the additional benefit of enabling
    a generic client-channel data passing mechanism.

    Reviewed-by: Atsushi Nemoto
    Signed-off-by: Dan Williams
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • YAMAMOTO-san noticed that task_dirty_inc doesn't seem to be called properly for
    cases where set_page_dirty is not used to dirty a page (eg. mark_buffer_dirty).

    Additionally, there is some inconsistency about when task_dirty_inc is
    called. It is used for dirty balancing, however it even gets called for
    __set_page_dirty_no_writeback.

    So rather than increment it in a set_page_dirty wrapper, move it down to
    exactly where the dirty page accounting stats are incremented.

    Cc: YAMAMOTO Takashi
    Signed-off-by: Nick Piggin
    Acked-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • As requested by Michael, add a missing check for valid flags in
    timerfd_settime(), and make it return EINVAL in case some extra bits are
    set.

    Michael said:
    If this is to be any use to userland apps that want to check flag
    support (perhaps it is too late already), then the sooner we get it
    into the kernel the better: 2.6.29 would be good; earlier stables as
    well would be even better.

    [akpm@linux-foundation.org: remove unused TFD_FLAGS_SET]
    Acked-by: Michael Kerrisk
    Signed-off-by: Davide Libenzi
    Cc: [2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • Currently seq_read assumes that the offset passed to it is always the
    offset it passed to user space. In the case pread this assumption is
    broken and we do the wrong thing when presented with pread.

    To solve this I introduce an offset cache inside of struct seq_file so we
    know where our logical file position is. Then in seq_read if we try to
    read from another offset we reset our data structures and attempt to go to
    the offset user space wanted.

    [akpm@linux-foundation.org: restore FMODE_PWRITE]
    [pjt@google.com: seq_open needs its fmode opened up to take advantage of this]
    Signed-off-by: Eric Biederman
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Paul Turner
    Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Biederman
     
  • Separate FMODE_PREAD and FMODE_PWRITE into separate flags to reflect the
    reality that the read and write paths may have independent restrictions.

    A git grep verifies that these flags are always cleared together so this
    new behavior will only apply to interfaces that change to clear flags
    individually.

    This is required for "seq_file: properly cope with pread", a post-2.6.25
    regression fix.

    [akpm@linux-foundation.org: add comment]
    Signed-off-by: Paul Turner
    Cc: Eric Biederman
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Turner
     
  • We have get_vm_area_caller() and __get_vm_area() but not
    __get_vm_area_caller()

    On powerpc, I use __get_vm_area() to separate the ranges of addresses
    given to vmalloc vs. ioremap (various good reasons for that) so in order
    to be able to implement the new caller tracking in /proc/vmallocinfo, I
    need a "_caller" variant of it.

    (akpm: needed for ongoing powerpc development, so merge it early)

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Benjamin Herrenschmidt
    Reviewed-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

18 Feb, 2009

5 commits


17 Feb, 2009

1 commit


16 Feb, 2009

1 commit

  • Impact: fix build error

    to fix:

    tip/arch/ia64/kernel/acpi.c:203: error: conflicting types for '__acpi_unmap_table'
    tip/include/linux/acpi.h:82: error: previous declaration of '__acpi_unmap_table' was here
    tip/arch/ia64/kernel/acpi.c:203: error: conflicting types for '__acpi_unmap_table'
    tip/include/linux/acpi.h:82: error: previous declaration of '__acpi_unmap_table' was here

    Signed-off-by: Yinghai Lu
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     

15 Feb, 2009

3 commits


14 Feb, 2009

2 commits

  • Conflicts:
    arch/x86/include/asm/setup.h

    Ingo Molnar
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ASoC: Only register AC97 bus if it's not done already
    ALSA: hda - Add snd_hda_multi_out_dig_cleanup()
    ALSA: hda - Add missing terminator in slave dig-out array
    ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model
    ALSA: hda - Register (new) devices at reconfig
    ALSA: mtpav - Fix initial value for input hwport
    ALSA: hda - add id for Intel IbexPeak integrated HDMI codec
    ALSA: hda - compute checksum in HDMI audio infoframe
    ALSA: hda - enable HDMI audio pin out at module loading time
    ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present
    ASoC: Update SDP3430 machine driver for snd_soc_card
    ALSA: hda - Add quirk for Asus z37e (1043:8284)
    sound: Remove OSSlib stuff from linux/soundcard.h
    ASoC: WM8990: Fix kcontrol's private value use in put callback
    ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback

    Linus Torvalds
     

13 Feb, 2009

6 commits

  • …ccess' and 'x86/urgent' into x86/core

    Ingo Molnar
     
  • …ug', 'x86/defconfig', 'x86/doc', 'x86/header-fixes', 'x86/headers' and 'x86/minor-fixes' into x86/core

    Ingo Molnar
     
  • Ingo Molnar
     
  • Conflicts:
    arch/x86/kernel/acpi/boot.c
    arch/x86/mm/fault.c

    Ingo Molnar
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
    wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface
    net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
    netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform
    bnx2: Update version to 1.9.2 and copyright.
    bnx2: Fix jumbo frames error handling.
    bnx2: Update 5709 firmware.
    bnx2: Update 5706/5708 firmware.
    3c505: do not set pcb->data.raw beyond its size
    Documentation/connector/cn_test.c: don't use gfp_any()
    net: don't use in_atomic() in gfp_any()
    IRDA: cnt is off by 1
    netxen: remove pcie workaround
    sun3: print when lance_open() fails
    qlge: bugfix: Add missing rx buf clean index on early exit.
    qlge: bugfix: Fix RX scaling values.
    qlge: bugfix: Fix TSO breakage.
    qlge: bugfix: Add missing dev_kfree_skb_any() call.
    qlge: bugfix: Add missing put_page() call.
    qlge: bugfix: Fix fatal error recovery hang.
    qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().
    ...

    Linus Torvalds
     
  • The problem is that in_atomic() will return false inside spinlocks if
    CONFIG_PREEMPT=n. This will lead to deadlockable GFP_KERNEL allocations
    from spinlocked regions.

    Secondly, if CONFIG_PREEMPT=y, this bug solves itself because networking
    will instead use GFP_ATOMIC from this callsite. Hence we won't get the
    might_sleep() debugging warnings which would have informed us of the buggy
    callsites.

    Solve both these problems by switching to in_interrupt(). Now, if someone
    runs a gfp_any() allocation from inside spinlock we will get the warning
    if CONFIG_PREEMPT=y.

    I reviewed all callsites and most of them were too complex for my little
    brain and none of them documented their interface requirements. I have no
    idea what this patch will do.

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton