31 Mar, 2009

5 commits

  • This makes the includes more explicit, and is preparation for moving
    md_k.h to drivers/md/md.h

    Remove include/raid/md.h as its only remaining use was to #include
    other files.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • The extern function definitions are kernel-internal definitions, so
    they belong in md_k.h

    The MD_*_VERSION values could reasonably go in a number of places,
    but md_u.h seems most reasonable.

    This leaves almost nothing in md.h. It will go soon.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • .. as they are part of the user-space interface.
    Also move MdpMinorShift into there so we can remove duplication.

    Lastly move mdp_major in. It is less obviously part of the user-space
    interface, but do_mounts_md.c uses it, and it is acting a bit like
    user-space.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Move the headers with the local structures for the disciplines and
    bitmap.h into drivers/md/ so that they are more easily grepable for
    hacking and not far away. md.h is left where it is for now as there
    are some uses from the outside.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: NeilBrown

    Christoph Hellwig
     
  • There are two problems with is_mddev_idle.

    1/ sync_io is 'atomic_t' and hence 'int'. curr_events and all the
    rest are 'long'.
    So if sync_io were to wrap on a 64bit host, the value of
    curr_events would go very negative suddenly, and take a very
    long time to return to positive.

    So do all calculations as 'int'. That gives us plenty of precision
    for what we need.

    2/ To initialise rdev->last_events we simply call is_mddev_idle, on
    the assumption that it will make sure that last_events is in a
    suitable range. It used to do this, but now it does not.
    So now we need to be more explicit about initialisation.

    Signed-off-by: NeilBrown

    NeilBrown
     

10 Mar, 2009

3 commits

  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Add p4-clockmod sysfs-ui removal to feature-removal schedule.
    Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod."

    Linus Torvalds
     
  • This reverts commit e088e4c9cdb618675874becb91b2fd581ee707e6.

    Removing the sysfs interface for p4-clockmod was flagged as a
    regression in bug 12826.

    Course of action:
    - Find out the remaining causes of overheating, and fix them
    if possible. ACPI should be doing the right thing automatically.
    If it isn't, we need to fix that.
    - mark p4-clockmod ui as deprecated
    - try again with the removal in six months.

    It's not really feasible to printk about the deprecation, because
    it needs to happen at all the sysfs entry points, which means adding
    a lot of strcmp("p4-clockmod".. calls to the core, which.. bleuch.

    Signed-off-by: Dave Jones

    Dave Jones
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
    p54: fix race condition in memory management
    cfg80211: test before subtraction on unsigned
    iwlwifi: fix error flow in iwl*_pci_probe
    rt2x00 : more devices to rt73usb.c
    rt2x00 : more devices to rt2500usb.c
    bonding: Fix device passed into ->ndo_neigh_setup().
    vlan: Fix vlan-in-vlan crashes.
    net: Fix missing dev->neigh_setup in register_netdevice().
    tmspci: fix request_irq race
    pkt_sched: act_police: Fix a rate estimator test.
    tg3: Fix 5906 link problems
    SCTP: change sctp_ctl_sock_init() to try IPv4 if IPv6 fails
    IPv6: add "disable" module parameter support to ipv6.ko
    sungem: another error printed one too early
    aoe: error printed 1 too early
    net pcmcia: worklimit reaches -1
    net: more timeouts that reach -1
    net: fix tokenring license
    dm9601: new vendor/product IDs
    netlink: invert error code in netlink_set_err()
    ...

    Linus Torvalds
     

09 Mar, 2009

4 commits


08 Mar, 2009

1 commit


06 Mar, 2009

1 commit


05 Mar, 2009

7 commits

  • HDIO_GET_IDENTITY returns 256 words currently.

    Noticed by Norman Diamond.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Stanislaw Gruszka
    Cc: Andrew Victor
    [bart: minor checkpatch.pl / CodingStyle fixups]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Stanislaw Gruszka
     
  • ap->sector_buf is used as DMA target and should at least be aligned on
    cacheline. This caused problems on some embedded machines.

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

    Tejun Heo
     
  • libata passes the returned value of dma_map_sg() to
    dma_unmap_sg(),which is the misuse of dma_unmap_sg().

    DMA-mapping.txt says:

    To unmap a scatterlist, just call:

    pci_unmap_sg(pdev, sglist, nents, direction);

    Again, make sure DMA activity has already finished.

    PLEASE NOTE: The 'nents' argument to the pci_unmap_sg call must be
    the _same_ one you passed into the pci_map_sg call,
    it should _NOT_ be the 'count' value _returned_ from the
    pci_map_sg call.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Bartlomiej Zolnierkiewicz
    Acked-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    FUJITA Tomonori
     
  • This fixes problems during resume with drives that take longer than 1s to
    be ready. The ATA-6 spec appears to allow 5 seconds for a drive to be
    ready.

    On one affected system, this patch changes "PM: resume devices took..."
    message from 17 seconds to 4 seconds, and gets rid of a lot of ugly
    timeout/error messages.

    Without this patch, the libata code moves on after 1s, tries to send a
    soft reset (which the drive doesn't see because it isn't ready) which also
    times out, then an IDENTIFY command is sent to the drive which times out,
    and finally the error handler will try to send another hard reset which
    will finally get things working.

    Signed-off-by: Stuart Hayes
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Stuart Hayes
     
  • David S. Miller
     
  • As analyzed by Patrick McHardy, vlan needs to reset it's
    netdev_ops pointer in it's ->init() function but this
    leaves the compat method pointers stale.

    Add a netdev_resync_ops() and call it from the vlan code.

    Any other driver which changes ->netdev_ops after register_netdevice()
    will need to call this new function after doing so too.

    With help from Patrick McHardy.

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

    David S. Miller
     

04 Mar, 2009

2 commits


03 Mar, 2009

2 commits

  • It turns out that net_alive is unnecessary, and the original problem
    that led to it being added was simply that the icmp code thought
    it was a network device and wound up being unable to handle packets
    while there were still packets in the network namespace.

    Now that icmp and tcp have been fixed to properly register themselves
    this problem is no longer present and we have a stronger guarantee
    that packets will not arrive in a network namespace then that provided
    by net_alive in netif_receive_skb. So remove net_alive allowing
    packet reception run a little faster.

    Additionally document the strong reason why network namespace cleanup
    is safe so that if something happens again someone else will have
    a chance of figuring it out.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    fix warning in io_mapping_map_wc()
    x86: i915 needs pgprot_writecombine() and is_io_mapping_possible()

    Linus Torvalds
     

02 Mar, 2009

1 commit


01 Mar, 2009

3 commits


28 Feb, 2009

2 commits

  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: enable DMAR by default
    xen: disable interrupts early, as start_kernel expects
    gpu/drm, x86, PAT: io_mapping_create_wc and resource_size_t
    gpu/drm, x86, PAT: Handle io_mapping_create_wc() errors in a clean way
    x86, Voyager: fix compile by lifting the degeneracy of phys_cpu_present_map
    x86, doc: fix references to Documentation/x86/i386/boot.txt

    Linus Torvalds
     
  • free_uid() and free_user_ns() are corecursive when CONFIG_USER_SCHED=n,
    but free_user_ns() is called from free_uid() by way of uid_hash_remove(),
    which requires uidhash_lock to be held. free_user_ns() then calls
    free_uid() to complete the destruction.

    Fix this by deferring the destruction of the user_namespace.

    Signed-off-by: David Howells
    Acked-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

27 Feb, 2009

1 commit

  • Impact: fix hung task with certain (non-default) rt-limit settings

    Corey Hickey reported that on using setuid to change the uid of a
    rt process, the process would be unkillable and not be running.
    This is because there was no rt runtime for that user group. Add
    in a check to see if a user can attach an rt task to its task group.
    On failure, return EINVAL, which is also returned in
    CONFIG_CGROUP_SCHED.

    Reported-by: Corey Hickey
    Signed-off-by: Dhaval Giani
    Acked-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar

    Dhaval Giani
     

26 Feb, 2009

5 commits

  • blk_recalc_rq_segments() requires a request structure passed in, which
    we don't have from blk_recount_segments(). So the latter allocates one on
    the stack, using > 400 bytes of stack for that. This can cause us to spill
    over one page of stack from ext4 at least:

    0) 4560 400 blk_recount_segments+0x43/0x62
    1) 4160 32 bio_phys_segments+0x1c/0x24
    2) 4128 32 blk_rq_bio_prep+0x2a/0xf9
    3) 4096 32 init_request_from_bio+0xf9/0xfe
    4) 4064 112 __make_request+0x33c/0x3f6
    5) 3952 144 generic_make_request+0x2d1/0x321
    6) 3808 64 submit_bio+0xb9/0xc3
    7) 3744 48 submit_bh+0xea/0x10e
    8) 3696 368 ext4_mb_init_cache+0x257/0xa6a [ext4]
    9) 3328 288 ext4_mb_regular_allocator+0x421/0xcd9 [ext4]
    10) 3040 160 ext4_mb_new_blocks+0x211/0x4b4 [ext4]
    11) 2880 336 ext4_ext_get_blocks+0xb61/0xd45 [ext4]
    12) 2544 96 ext4_get_blocks_wrap+0xf2/0x200 [ext4]
    13) 2448 80 ext4_da_get_block_write+0x6e/0x16b [ext4]
    14) 2368 352 mpage_da_map_blocks+0x7e/0x4b3 [ext4]
    15) 2016 352 ext4_da_writepages+0x2ce/0x43c [ext4]
    16) 1664 32 do_writepages+0x2d/0x3c
    17) 1632 144 __writeback_single_inode+0x162/0x2cd
    18) 1488 96 generic_sync_sb_inodes+0x1e3/0x32b
    19) 1392 16 sync_sb_inodes+0xe/0x10
    20) 1376 48 writeback_inodes+0x69/0xb3
    21) 1328 208 balance_dirty_pages_ratelimited_nr+0x187/0x2f9
    22) 1120 224 generic_file_buffered_write+0x1d4/0x2c4
    23) 896 176 __generic_file_aio_write_nolock+0x35f/0x393
    24) 720 80 generic_file_aio_write+0x6c/0xc8
    25) 640 80 ext4_file_write+0xa9/0x137 [ext4]
    26) 560 320 do_sync_write+0xf0/0x137
    27) 240 48 vfs_write+0xb3/0x13c
    28) 192 64 sys_write+0x4c/0x74
    29) 128 128 system_call_fastpath+0x16/0x1b

    Split the segment counting out into a __blk_recalc_rq_segments() helper
    to avoid allocating an onstack request just for checking the physical
    segment count.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This patch fixes a bug located by Vegard Nossum with the aid of
    kmemcheck, updated based on review comments from Nick Piggin,
    Ingo Molnar, and Andrew Morton. And cleans up the variable-name
    and function-name language. ;-)

    The boot CPU runs in the context of its idle thread during boot-up.
    During this time, idle_cpu(0) will always return nonzero, which will
    fool Classic and Hierarchical RCU into deciding that a large chunk of
    the boot-up sequence is a big long quiescent state. This in turn causes
    RCU to prematurely end grace periods during this time.

    This patch changes the rcutree.c and rcuclassic.c rcu_check_callbacks()
    function to ignore the idle task as a quiescent state until the
    system has started up the scheduler in rest_init(), introducing a
    new non-API function rcu_idle_now_means_idle() to inform RCU of this
    transition. RCU maintains an internal rcu_idle_cpu_truthful variable
    to track this state, which is then used by rcu_check_callback() to
    determine if it should believe idle_cpu().

    Because this patch has the effect of disallowing RCU grace periods
    during long stretches of the boot-up sequence, this patch also introduces
    Josh Triplett's UP-only optimization that makes synchronize_rcu() be a
    no-op if num_online_cpus() returns 1. This allows boot-time code that
    calls synchronize_rcu() to proceed normally. Note, however, that RCU
    callbacks registered by call_rcu() will likely queue up until later in
    the boot sequence. Although rcuclassic and rcutree can also use this
    same optimization after boot completes, rcupreempt must restrict its
    use of this optimization to the portion of the boot sequence before the
    scheduler starts up, given that an rcupreempt RCU read-side critical
    section may be preeempted.

    In addition, this patch takes Nick Piggin's suggestion to make the
    system_state global variable be __read_mostly.

    Changes since v4:

    o Changes the name of the introduced function and variable to
    be less emotional. ;-)

    Changes since v3:

    o WARN_ON(nr_context_switches() > 0) to verify that RCU
    switches out of boot-time mode before the first context
    switch, as suggested by Nick Piggin.

    Changes since v2:

    o Created rcu_blocking_is_gp() internal-to-RCU API that
    determines whether a call to synchronize_rcu() is itself
    a grace period.

    o The definition of rcu_blocking_is_gp() for rcuclassic and
    rcutree checks to see if but a single CPU is online.

    o The definition of rcu_blocking_is_gp() for rcupreempt
    checks to see both if but a single CPU is online and if
    the system is still in early boot.

    This allows rcupreempt to again work correctly if running
    on a single CPU after booting is complete.

    o Added check to rcupreempt's synchronize_sched() for there
    being but one online CPU.

    Tested all three variants both SMP and !SMP, booted fine, passed a short
    rcutorture test on both x86 and Power.

    Located-by: Vegard Nossum
    Tested-by: Vegard Nossum
    Tested-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • During host driver module removal del_gendisk() results in a final
    put on drive->gendev and freeing the drive by drive_release_dev().

    Convert device drivers from using struct kref to use struct device
    so device driver's object holds reference on ->gendev and prevents
    drive from prematurely going away.

    Also fix ->remove methods to not erroneously drop reference on a
    host driver by using only put_device() instead of ide*_put().

    Reported-by: Stanislaw Gruszka
    Tested-by: Stanislaw Gruszka
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/i915: convert DRM_ERROR to DRM_DEBUG in phys object pwrite path
    drm/i915: make hw page ioremap use ioremap_wc
    drm: edid revision 0 is valid
    drm: Correct unbalanced drm_vblank_put() during mode setting.
    drm: disable encoders before re-routing them
    drm: Fix ordering of bit fields in EDID structure leading huge vsync values.
    drm: Fix shifts of EDID vsync offset/width fields.
    drm/i915: handle bogus VBT panel timing
    drm/i915: remove PLL debugging messages

    Linus Torvalds
     
  • * git://git.infradead.org/iommu-2.6:
    intel-iommu: fix endless "Unknown DMAR structure type" loop
    VT-d: handle Invalidation Queue Error to avoid system hang
    intel-iommu: fix build error with INTR_REMAP=y and DMAR=n

    Linus Torvalds
     

25 Feb, 2009

3 commits

  • io_mapping_create_wc should take a resource_size_t parameter in place of
    unsigned long. With unsigned long, there will be no way to map greater than 4GB
    address in i386/32 bit.

    On x86, greater than 4GB addresses cannot be mapped on i386 without PAE. Return
    error for such a case.

    Patch also adds a structure for io_mapping, that saves the base, size and
    type on HAVE_ATOMIC_IOMAP archs, that can be used to verify the offset on
    io_mapping_map calls.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Suresh Siddha
    Cc: Dave Airlie
    Cc: Jesse Barnes
    Cc: Eric Anholt
    Cc: Keith Packard
    Signed-off-by: Ingo Molnar

    Venkatesh Pallipadi
     
  • In some cases we may receive a mode config that has a different
    CRTCencoder map that the current configuration. In that case, we
    need to disable any re-routed encoders before setting the mode,
    otherwise they may not pick up the new CRTC (if the output types are
    incompatible for example).

    Tested-by: Kristian Høgsberg
    Signed-off-by: Jesse Barnes
    Signed-off-by: Dave Airlie

    Jesse Barnes
     
  • Signed-off-by: Jesse Barnes
    Reviewed-by: Eric Anholt
    Signed-off-by: Dave Airlie

    Jesse Barnes