02 Jun, 2011

12 commits

  • Signed-off-by: Joe Perches
    Acked-by: Konrad Rzeszutek Wilk
    Signed-off-by: Paul Mundt

    Joe Perches
     
  • Both were buggy: bind would happily scribble over a real graphics
    device and unbind wouldn't destroy the framebuffer. Hotplugging
    efifb makes no sense anyway, so just disable it.

    As an added benefit, we save some runtime memory.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Jones
    Signed-off-by: Paul Mundt

    Andy Lutomirski
     
  • Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Jones
    Signed-off-by: Paul Mundt

    Andy Lutomirski
     
  • Running fbcon on an uncached framebuffer is remarkably slow. So try
    to enable write combining in efifb.

    Without this patch, it takes 5.8 seconds from efifb probe to i915
    probe (default options; no plymouth or quiet mode). With this patch,
    it only takes 1.7 seconds. That means we wasted over 4 seconds just
    writing to UC memory.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Jones
    Signed-off-by: Paul Mundt

    Andy Lutomirski
     
  • Add a label for error-handling code in the case where only clk_get has
    succeeded. Rename the label failed to be consistent with the rest.

    A simplified version of the semantic match that finds the missing clk_put
    is as follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression e1,e2;
    statement S;
    @@

    e1 = clk_get@p1(...);
    ... when != e1 = e2
    when != clk_put(e1)
    when any
    if (...) { ... when != clk_put(e1)
    when != if (...) { ... clk_put(e1) ... }
    * return@p3 ...;
    } else S
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Paul Mundt

    Julia Lawall
     
  • Reorder the labels at the end of the function to correspond to the order in
    which the resources are allocated.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression e1,e2;
    statement S;
    @@

    e1 = clk_get@p1(...);
    ... when != e1 = e2
    when != clk_put(e1)
    when any
    if (...) { ... when != clk_put(e1)
    when != if (...) { ... clk_put(e1) ... }
    * return@p3 ...;
    } else S
    //

    Signed-off-by: Julia Lawall
    Acked-by: Sascha Hauer
    Signed-off-by: Paul Mundt

    Julia Lawall
     
  • Seems this new field was missed, probably due to this driver being merged
    around the time this new backlight field was being added. At any rate,
    initial the type field to avoid ugly WARN() dumps.

    Signed-off-by: Steven Miao
    Signed-off-by: Mike Frysinger
    Signed-off-by: Paul Mundt

    Steven Miao
     
  • If there is no EDID but an LCD panel is detected, generate a CVT
    mode from the panel resolution (at 60 Hz), and use this as a
    default mode instead of the hardcoded 800x600x8 mode.

    Signed-off-by: Tormod Volden
    Signed-off-by: Paul Mundt

    Tormod Volden
     
  • The LCDC driver does no longer compile:

    CC drivers/video/sh_mobile_meram.o
    CC drivers/video/sh_mobile_lcdcfb.o
    drivers/video/sh_mobile_lcdcfb.c: In function 'sh_mobile_lcdc_start':
    drivers/video/sh_mobile_lcdcfb.c:640:4: error: 'ret' undeclared (first use in this function)
    drivers/video/sh_mobile_lcdcfb.c:640:4: note: each undeclared identifier is reported only once for each function it appears in
    make[2]: *** [drivers/video/sh_mobile_lcdcfb.o] Error 1
    make[1]: *** [drivers/video] Error 2
    make: *** [drivers] Error 2

    Reported-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This reverts commit a197b59ae6e8bee56fcef37ea2482dc08414e2ac.

    As rmk says:
    "Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
    configured) is causing regressions on ARM with various drivers which
    use GFP_DMA.

    The behaviour up until now has been to silently ignore that flag when
    CONFIG_ZONE_DMA is not enabled, and to allocate from the normal zone.
    However, as a result of the above commit, such allocations now fail
    which causes drivers to fail. These are regressions compared to the
    previous kernel version."

    so just revert it.

    Requested-by: Russell King
    Acked-by: Andrew Morton
    Cc: David Rientjes
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.infradead.org/iommu-2.6:
    intel-iommu: Fix off-by-one in RMRR setup
    intel-iommu: Add domain check in domain_remove_one_dev_info
    intel-iommu: Remove Host Bridge devices from identity mapping
    intel-iommu: Use coherent DMA mask when requested
    intel-iommu: Dont cache iova above 32bit
    intel-iommu: Speed up processing of the identity_mapping function
    intel-iommu: Check for identity mapping candidate using system dma mask
    intel-iommu: Only unlink device domains from iommu
    intel-iommu: Enable super page (2MiB, 1GiB, etc.) support
    intel-iommu: Flush unmaps at domain_exit
    intel-iommu: Remove obsolete comment from detect_intel_iommu
    intel-iommu: fix VT-d PMR disable for TXT on S3 resume

    Linus Torvalds
     
  • Jens' back-merge commit 698567f3fa79 ("Merge commit 'v2.6.39' into
    for-2.6.40/core") was incorrectly done, and re-introduced the
    DISK_EVENT_MEDIA_CHANGE lines that had been removed earlier in commits

    - 9fd097b14918 ("block: unexport DISK_EVENT_MEDIA_CHANGE for
    legacy/fringe drivers")

    - 7eec77a1816a ("ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd
    and ide-cd")

    because of conflicts with the "g->flags" updates near-by by commit
    d4dc210f69bc ("block: don't block events on excl write for non-optical
    devices")

    As a result, we re-introduced the hanging behavior due to infinite disk
    media change reports.

    Tssk, tssk, people! Don't do back-merges at all, and *definitely* don't
    do them to hide merge conflicts from me - especially as I'm likely
    better at merging them than you are, since I do so many merges.

    Reported-by: Steven Rostedt
    Cc: Jens Axboe
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

01 Jun, 2011

19 commits

  • * git://git.infradead.org/mtd-2.6:
    mtd: fix physmap.h warnings

    Linus Torvalds
     
  • We were mapping an extra byte (and hence usually an extra page):
    iommu_prepare_identity_map() expects to be given an 'end' argument which
    is the last byte to be mapped; not the first byte *not* to be mapped.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • The comment in domain_remove_one_dev_info() states "No need to compare
    PCI domain; it has to be the same". But for the si_domain that isn't
    going to be true, as it consists of all the PCI devices that are
    identity mapped thus multiple PCI domains can be in si_domain. The
    code needs to validate the PCI domain too.

    Signed-off-by: Mike Habeck
    Signed-off-by: Mike Travis
    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    Mike Habeck
     
  • When using the 1:1 (identity) PCI DMA remapping, PCI Host Bridge devices
    that do not use the IOMMU causes a kernel panic. Fix that by not
    inserting those devices into the si_domain.

    Signed-off-by: Mike Travis
    Reviewed-by: Mike Habeck
    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    Mike Travis
     
  • The __intel_map_single function is not honoring the passed in DMA mask.
    This results in not using the coherent DMA mask when called from
    intel_alloc_coherent().

    Signed-off-by: Mike Travis
    Acked-by: Chris Wright
    Reviewed-by: Mike Habeck
    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    Mike Travis
     
  • Mike Travis and Mike Habeck reported an issue where iova allocation
    would return a range that was larger than a device's dma mask.

    https://lkml.org/lkml/2011/3/29/423

    The dmar initialization code will reserve all PCI MMIO regions and copy
    those reservations into a domain specific iova tree. It is possible for
    one of those regions to be above the dma mask of a device. It is typical
    to allocate iovas with a 32bit mask (despite device's dma mask possibly
    being larger) and cache the result until it exhausts the lower 32bit
    address space. Freeing the iova range that is >= the last iova in the
    lower 32bit range when there is still an iova above the 32bit range will
    corrupt the cached iova by pointing it to a region that is above 32bit.
    If that region is also larger than the device's dma mask, a subsequent
    allocation will return an unusable iova and cause dma failure.

    Simply don't cache an iova that is above the 32bit caching boundary.

    Reported-by: Mike Travis
    Reported-by: Mike Habeck
    Cc: stable@kernel.org
    Acked-by: Mike Travis
    Tested-by: Mike Habeck
    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     
  • When there are a large count of PCI devices, and the pass through
    option for iommu is set, much time is spent in the identity_mapping
    function hunting though the iommu domains to check if a specific
    device is "identity mapped".

    Speed up the function by checking the cached info to see if
    it's mapped to the static identity domain.

    Signed-off-by: Mike Travis
    Reviewed-by: Mike Habeck
    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    Mike Travis
     
  • The identity mapping code appears to make the assumption that if the
    devices dma_mask is greater than 32bits the device can use identity
    mapping. But that is not true: take the case where we have a 40bit
    device in a 44bit architecture. The device can potentially receive a
    physical address that it will truncate and cause incorrect addresses
    to be used.

    Instead check to see if the device's dma_mask is large enough
    to address the system's dma_mask.

    Signed-off-by: Mike Travis
    Reviewed-by: Mike Habeck
    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    Chris Wright
     
  • Commit a97590e5 added unlinking domains from iommus to reciprocate the
    iommu from domains unlinking that was already done. We actually want
    to only do this for device domains and never for the static
    identity map domain or VM domains. The SI domain is special and
    never freed, while VM domain->id lives in their own special address
    space, separate from iommu->domain_ids.

    In the current code, a VM can get domain->id zero, then mark that
    domain unused when unbound from pci-stub. This leads to DMAR
    write faults when the device is re-bound to the host driver.

    Signed-off-by: Alex Williamson
    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    Alex Williamson
     
  • There are no externally-visible changes with this. In the loop in the
    internal __domain_mapping() function, we simply detect if we are mapping:
    - size >= 2MiB, and
    - virtual address aligned to 2MiB, and
    - physical address aligned to 2MiB, and
    - on hardware that supports superpages.

    (and likewise for larger superpages).

    We automatically use a superpage for such mappings. We never have to
    worry about *breaking* superpages, since we trust that we will always
    *unmap* the same range that was mapped. So all we need to do is ensure
    that dma_pte_clear_range() will also cope with superpages.

    Adjust pfn_to_dma_pte() to take a superpage 'level' as an argument, so
    it can return a PTE at the appropriate level rather than always
    extending the page tables all the way down to level 1. Again, this is
    simplified by the fact that we should never encounter existing small
    pages when we're creating a mapping; any old mapping that used the same
    virtual range will have been entirely removed and its obsolete page
    tables freed.

    Provide an 'intel_iommu=sp_off' argument on the command line as a
    chicken bit. Not that it should ever be required.

    ==

    The original commit seen in the iommu-2.6.git was Youquan's
    implementation (and completion) of my own half-baked code which I'd
    typed into an email. Followed by half a dozen subsequent 'fixes'.

    I've taken the unusual step of rewriting history and collapsing the
    original commits in order to keep the main history simpler, and make
    life easier for the people who are going to have to backport this to
    older kernels. And also so I can give it a more coherent commit comment
    which (hopefully) gives a better explanation of what's going on.

    The original sequence of commits leading to identical code was:

    Youquan Song (3):
    intel-iommu: super page support
    intel-iommu: Fix superpage alignment calculation error
    intel-iommu: Fix superpage level calculation error in dma_pfn_level_pte()

    David Woodhouse (4):
    intel-iommu: Precalculate superpage support for dmar_domain
    intel-iommu: Fix hardware_largepage_caps()
    intel-iommu: Fix inappropriate use of superpages in __domain_mapping()
    intel-iommu: Fix phys_pfn in __domain_mapping for sglist pages

    Signed-off-by: Youquan Song
    Signed-off-by: David Woodhouse

    Youquan Song
     
  • Fix build warnings in physmap.h:

    include/linux/mtd/physmap.h:25: warning: 'struct platform_device' declared inside parameter list
    include/linux/mtd/physmap.h:25: warning: its scope is only this definition or declaration, which is probably not what you want
    include/linux/mtd/physmap.h:26: warning: 'struct platform_device' declared inside parameter list
    include/linux/mtd/physmap.h:27: warning: 'struct platform_device' declared inside parameter list

    Signed-off-by: Randy Dunlap
    Signed-off-by: David Woodhouse

    Randy Dunlap
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    AppArmor: fix oops in apparmor_setprocattr

    Linus Torvalds
     
  • The new instruction_pointer_set helper is defined for people who have
    converted to asm-generic/ptrace.h, so don't use it generally unless
    the arch needs it (in which case it has been converted). This should
    fix building of kgdb tests for arches not yet converted.

    Signed-off-by: Mike Frysinger
    Acked-by: Stephen Rothwell
    Cc: Jason Wessel
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • When invalid parameters are passed to apparmor_setprocattr a NULL deref
    oops occurs when it tries to record an audit message. This is because
    it is passing NULL for the profile parameter for aa_audit. But aa_audit
    now requires that the profile passed is not NULL.

    Fix this by passing the current profile on the task that is trying to
    setprocattr.

    Signed-off-by: Kees Cook
    Signed-off-by: John Johansen
    Cc: stable@kernel.org
    Signed-off-by: James Morris

    Kees Cook
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    virtio_net: delay TX callbacks
    virtio: add api for delayed callbacks
    virtio_test: support event index
    vhost: support event index
    virtio_ring: support event idx feature
    virtio ring: inline function to check for events
    virtio: event index interface
    virtio: add full three-clause BSD text to headers.
    virtio balloon: kill tell-host-first logic
    virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT.
    drivers, block: virtio_blk: Replace cryptic number with the macro
    virtio_blk: allow re-reading config space at runtime
    lguest: remove support for VIRTIO_F_NOTIFY_ON_EMPTY.
    lguest: fix up compilation after move
    lguest: fix timer interrupt setup

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] wire up sendmmsg() syscall for Itanium

    Linus Torvalds
     
  • Add entries in unistd.h and entry.S to make this new syscall visible.

    Signed-off-by: Tony Luck

    Tony Luck
     
  • …/git/tip/linux-2.6-tip

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix mwait_play_dead() faulting on mwait-incapable cpus
    x86 idle: Fix mwait deprecation warning message

    Evil merge to remove extra quote noticed by Joe Perches

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

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    rcu: Cure load woes

    Linus Torvalds
     

31 May, 2011

4 commits

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

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.o

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    autofs4: bogus dentry_unhash() added in ->unlink()
    vfs: shrink_dcache_parent before rmdir, dir rename

    Linus Torvalds
     
  • The Apple custom PIC only exist in some earlier machine models,
    anything with an MPIC will crash on suspend if we register those
    syscore ops unconditionally.

    This is a regression caused by commit f5a592f7d74e ("PM / PowerPC: Use
    struct syscore_ops instead of sysdevs for PM")

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • Commit cc3ce5176d83 (rcu: Start RCU kthreads in TASK_INTERRUPTIBLE
    state) fudges a sleeping task' state, resulting in the scheduler seeing
    a TASK_UNINTERRUPTIBLE task going to sleep, but a TASK_INTERRUPTIBLE
    task waking up. The result is unbalanced load calculation.

    The problem that patch tried to address is that the RCU threads could
    stay in UNINTERRUPTIBLE state for quite a while and triggering the hung
    task detector due to on-demand wake-ups.

    Cure the problem differently by always giving the tasks at least one
    wake-up once the CPU is fully up and running, this will kick them out of
    the initial UNINTERRUPTIBLE state and into the regular INTERRUPTIBLE
    wait state.

    [ The alternative would be teaching kthread_create() to start threads as
    INTERRUPTIBLE but that needs a tad more thought. ]

    Reported-by: Damien Wyart
    Signed-off-by: Peter Zijlstra
    Acked-by: Paul E. McKenney
    Link: http://lkml.kernel.org/r/1306755291.1200.2872.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

30 May, 2011

5 commits