07 Aug, 2011

4 commits

  • Patch reviewers now recommend not splitting long user-visible strings,
    such as printk messages, even if they exceed 80 columns. This avoids
    breaking grep. However, that recommendation did not actually appear
    anywhere in Documentation/CodingStyle.

    See, for example, the thread at
    http://news.gmane.org/find-root.php?message_id=%3c1312215262.11635.15.camel%40Joe%2dLaptop%3e

    Signed-off-by: Josh Triplett
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • The CLOEXE bit is magical, and for performance (and semantic) reasons we
    don't actually maintain it in the file descriptor itself, but in a
    separate bit array. Which means that when we show f_flags, the CLOEXE
    status is shown incorrectly: we show the status not as it is now, but as
    it was when the file was opened.

    Fix that by looking up the bit properly in the 'fdt->close_on_exec' bit
    array.

    Uli needs this in order to re-implement the pfiles program:

    "For normal file descriptors (not sockets) this was the last piece of
    information which wasn't available. This is all part of my 'give
    Solaris users no reason to not switch' effort. I intend to offer the
    code to the util-linux-ng maintainers."

    Requested-by: Ulrich Drepper
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • WARN_ONCE() is very annoying, in that it shows the stack trace that we
    don't care about at all, and also triggers various user-level "kernel
    oopsed" logic that we really don't care about. And it's not like the
    user can do anything about the applications (sshd) in question, it's a
    distro issue.

    Requested-by: Andi Kleen (and many others)
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • For ChromiumOS, we use SHA-1 to verify the integrity of the root
    filesystem. The speed of the kernel sha-1 implementation has a major
    impact on our boot performance.

    To improve boot performance, we investigated using the heavily optimized
    sha-1 implementation used in git. With the git sha-1 implementation, we
    see a 11.7% improvement in boot time.

    10 reboots, remove slowest/fastest.

    Before:

    Mean: 6.58 seconds Stdev: 0.14

    After (with git sha-1, this patch):

    Mean: 5.89 seconds Stdev: 0.07

    The other cool thing about the git SHA-1 implementation is that it only
    needs 64 bytes of stack for the workspace while the original kernel
    implementation needed 320 bytes.

    Signed-off-by: Mandeep Singh Baines
    Cc: Ramsay Jones
    Cc: Nicolas Pitre
    Cc: Herbert Xu
    Cc: David S. Miller
    Cc: linux-crypto@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Mandeep Singh Baines
     

06 Aug, 2011

4 commits

  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (55 commits)
    Revert "drm/i915: Try enabling RC6 by default (again)"
    drm/radeon: Extended DDC Probing for ECS A740GM-M DVI-D Connector
    drm/radeon: Log Subsystem Vendor and Device Information
    drm/radeon: Extended DDC Probing for Connectors with Improperly Wired DDC Lines (here: Asus M2A-VM HDMI)
    drm: Separate EDID Header Check from EDID Block Check
    drm: Add NULL check about irq functions
    drm: Fix irq install error handling
    drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c
    drm/radeon: clean reg header files
    drm/debugfs: Initialise empty variable
    drm/radeon/kms: add thermal chip quirk for asus 9600xt
    drm/radeon: off by one in check_reg() functions
    drm/radeon/kms: fix version comment due to merge timing
    drm/i915: allow cache sharing policy control
    drm/i915/hdmi: HDMI source product description infoframe support
    drm/i915/hdmi: split infoframe setting from infoframe type code
    drm: track CEA version number if present
    drm/i915: Try enabling RC6 by default (again)
    Revert "drm/i915/dp: Zero the DPCD data before connection probe"
    drm/i915/dp: wait for previous AUX channel activity to clear
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc: Size mondo queues more sanely.
    sparc: Access kernel TSB using physical addressing when possible.
    sparc: Fix __atomic_add_unless() return value.
    sparc: use kbuild-generic support for true asm-generic header files
    sparc: Use popc when possible for ffs/__ffs/ffz.
    sparc: Set reboot-cmd using reboot data hypervisor call if available.
    sparc: Add some missing hypervisor API groups.
    sparc: Use hweight64() in popc emulation.
    sparc: Use popc if possible for hweight routines.
    sparc: Minor tweaks to Niagara page copy/clear.
    sparc: Sanitize cpu feature detection and reporting.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits)
    ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
    mlx4: decreasing ref count when removing mac
    net: Fix security_socket_sendmsg() bypass problem.
    net: Cap number of elements for sendmmsg
    net: sendmmsg should only return an error if no messages were sent
    ixgbe: fix PHY link setup for 82599
    ixgbe: fix __ixgbe_notify_dca() bail out code
    igb: fix WOL on second port of i350 device
    e1000e: minor re-order of #include files
    e1000e: remove unnecessary check for NULL pointer
    intel drivers: repair missing flush operations
    macb: restore wrap bit when performing underrun cleanup
    cdc_ncm: fix endianness problem.
    irda: use PCI_VENDOR_ID_*
    mlx4: Fixing Ethernet unicast packet steering
    net: fix NULL dereferences in check_peer_redir()
    bnx2x: Clear MDIO access warning during first driver load
    bnx2x: Fix BCM578xx MAC test
    bnx2x: Fix BCM54618se invalid link indication
    bnx2x: Fix BCM84833 link
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
    drivers/ide/cy82c693.c: Add missing pci_dev_put
    ide: Fix irq flags madness

    Linus Torvalds
     

05 Aug, 2011

20 commits

  • When support for binding to 'mapped INADDR_ANY (::ffff.0.0.0.0)' was added
    in 0f8d3c7ac3693d7b6c731bf2159273a59bf70e12 the rest of the code
    wasn't told so now it's possible to bind IPv6 datagram socket to
    ::ffff.0.0.0.0, connect it to another IPv4 address and it will all
    work except for getsockhame() which does not return the local address
    as expected.

    To give getsockname() something to work with check for 'mapped INADDR_ANY'
    when connecting and update the in-core source addresses appropriately.

    Signed-off-by: Max Matveev
    Signed-off-by: David S. Miller

    Max Matveev
     
  • For older FW versions, when a Mac address removed from Mac table,
    we should set 0 for reference count for the corresponding Mac index.
    Fixes a bug where removing Mac from the table still left that entry as
    invalid.

    Signed-off-by: Yevgeny Petrilin
    Tested-by: Roland Dreier
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • David S. Miller
     
  • The sendmmsg() introduced by commit 228e548e "net: Add sendmmsg socket system
    call" is capable of sending to multiple different destination addresses.

    SMACK is using destination's address for checking sendmsg() permission.
    However, security_socket_sendmsg() is called for only once even if multiple
    different destination addresses are passed to sendmmsg().

    Therefore, we need to call security_socket_sendmsg() for each destination
    address rather than only the first destination address.

    Since calling security_socket_sendmsg() every time when only single destination
    address was passed to sendmmsg() is a waste of time, omit calling
    security_socket_sendmsg() unless destination address of previous datagram and
    that of current datagram differs.

    Signed-off-by: Tetsuo Handa
    Acked-by: Anton Blanchard
    Cc: stable [3.0+]
    Signed-off-by: David S. Miller

    Tetsuo Handa
     
  • To limit the amount of time we can spend in sendmmsg, cap the
    number of elements to UIO_MAXIOV (currently 1024).

    For error handling an application using sendmmsg needs to retry at
    the first unsent message, so capping is simpler and requires less
    application logic than returning EINVAL.

    Signed-off-by: Anton Blanchard
    Cc: stable [3.0+]
    Signed-off-by: David S. Miller

    Anton Blanchard
     
  • sendmmsg uses a similar error return strategy as recvmmsg but it
    turns out to be a confusing way to communicate errors.

    The current code stores the error code away and returns it on the next
    sendmmsg call. This means a call with completely valid arguments could
    get an error from a previous call.

    Change things so we only return an error if no datagrams could be sent.
    If less than the requested number of messages were sent, the application
    must retry starting at the first failed one and if the problem is
    persistent the error will be returned.

    This matches the behaviour of other syscalls like read/write - it
    is not an error if less than the requested number of elements are sent.

    Signed-off-by: Anton Blanchard
    Cc: stable [3.0+]
    Signed-off-by: David S. Miller

    Anton Blanchard
     
  • This reverts commit 4e20fa65a3ea789510eed1a15deb9e8aab2b8202.

    Francesco Allertsen still has a broken configuration.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • There is currently no upper limit on the mondo queue sizes we'll use,
    which guarentees that we'll eventually his page allocation limits, and
    thus allocation failures, due to MAX_ORDER.

    Cap the sizes sanely, current limits are:

    CPU MONDO 2 * max_possible_cpus
    DEV MONDO 256 (basically NR_IRQS)
    RES MONDO 128
    NRES MONDO 4

    Signed-off-by: David S. Miller

    David S. Miller
     
  • On sun4v this is basically required since we point the hypervisor and
    the TSB walking hardware at these tables using physical addressing
    too.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This isn't really critical any more, since other patches (commit
    298507d4d2cf: "shm: optimize exit_shm()") have caused us to not actually
    need to touch the rw_mutex unless there are actual shm segments
    associated with the namespace, but we really should do tne shm_init_ns()
    earlier than we do now.

    This, together with commit 288d5abec831 ("Boot up with usermodehelper
    disabled") will mean that we really do initialize the initial ipc
    namespace data structure before we run any tasks.

    Tested-by: Marc Zyngier
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    RCUify freeing acls, let check_acl() go ahead in RCU mode if acl is cached
    get rid of boilerplate switches in posix_acl.h
    fix block device fallout from ->fsync() changes

    Linus Torvalds
     
  • * 'fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    efi: Fix argument types for SetVariable() for ia64

    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:
    slab, lockdep: Annotate the locks before using them
    lockdep: Clear whole lockdep_map on initialization
    slab, lockdep: Annotate slab -> rcu -> debug_object -> slab
    lockdep: Fix up warning
    lockdep: Fix trace_hardirqs_on_caller()
    futex: Fix regression with read only mappings

    Linus Torvalds
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
    dmaengine: use DEFINE_IDR for static initialization
    ioat: fix xor_idx_to_desc
    Avoid section type conflict in dma/ioat/dma_v3.c
    ioat: Adding PCI IDs for IOAT devices on SandyBridge platforms

    Linus Torvalds
     
  • Commit a0bfa1373859e9d11dc92561a8667588803e42d8 mispells
    cpuidle_idle_call() on ARM and SH code. Fix this to be consistent.

    Cc: Kevin Hilman
    Cc: Paul Mundt
    Cc: x86@kernel.org
    Cc: Len Brown
    Signed-off-by: David Brown
    [ Also done by Mark Brown - th ebug has been around forever, and was
    noticed in -next, but the idle tree never picked it up. Bad bad bad ]
    Signed-off-by: Linus Torvalds

    David Brown
     
  • The spec says this takes uint32 for attributes, not uintn.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Tony Luck

    Matthew Garrett
     
  • * 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
    Revert "dt: add of_alias_scan and of_alias_get_id"
    dt: remove of_alias_get_id() reference

    Linus Torvalds
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
    [PARISC] wire up sendmmsg syscall
    [PARISC] fix return type of __atomic64_add_return
    [PARISC] Fix futex support

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] signal: use set_restore_sigmask() helper
    [S390] smp: remove pointless comments in startup_secondary()
    [S390] qdio: Use kstrtoul_from_user
    [S390] sclp_async: Use kstrtoul_from_user
    [S390] exec: remove redundant set_fs(USER_DS)
    [S390] cpu hotplug: on cpu start wait until being marked active
    [S390] signal: convert to use set_current_blocked()
    [S390] asm offsets: fix coding style
    [S390] Add support for IBM zEnterprise 114
    [S390] dasd: check if raw track access is supported
    [S390] Use diagnose 308 for system reset
    [S390] Export store_status() function
    [S390] dasd: use vmalloc for statistics input buffer
    [S390] Add PSW restart shutdown trigger
    [S390] missing return in page_table_alloc_pgste
    [S390] qdio: 2nd stage retry on SIGA-W busy conditions

    Linus Torvalds
     
  • While `pci_eisa_driver' still refer `pci_eisa_init', the .probe() function
    should not be called after init memory release, as pointed out by commit
    74b9a297. The structure is still referenced in the drivers subsystem, and can
    be accesseed through sysfs, so the modpost warning is a false positive. Mark
    it as such.

    In the same time, the warning referenced in 005bdad7b80 did only mention
    `pci_eisa_driver', not `pci_eisa_pci_tbl', so remove its marking.

    Broken-by: Arnaud Lacombe (in 005bdad7b80)
    Reported-by: Tetsuo Handa
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Linus Torvalds

    Arnaud Lacombe
     

04 Aug, 2011

12 commits

  • ECS A740GM-M with ATI RADEON 2100 sends data to i2c bus
    for a DVI connector that is not implemented/existent on the board.

    Fix by applying extented DDC probing for this connector.

    Requires [PATCH] drm/radeon: Extended DDC Probing for Connectors
    with Improperly Wired DDC Lines

    Tested for kernel 2.6.38 on Asus ECS A740GM-M board

    BugLink: http://bugs.launchpad.net/bugs/810926

    Cc:
    Signed-off-by: Thomas Reim
    Reviewed-by: Alex Deucher
    Acked-by: Stephen Michaels
    Signed-off-by: Dave Airlie

    Thomas Reim
     
  • Log PCI subsystem vendor and subsystem device ID in addition to
    PCI vendor and device ID during kernel mode initialisation. This helps
    to better identify radeon devices of third-party vendors, e. g. for
    bug analysis.

    Tested for kernel 2.6.35, 2.6.38 and 3.0 on Asus M2A-VM HDMI board

    Cc:
    Signed-off-by: Thomas Reim
    Reviewed-by: Alex Deucher
    Acked-by: Stephen Michaels
    Signed-off-by: Dave Airlie

    Thomas Reim
     
  • …(here: Asus M2A-VM HDMI)

    Some integrated ATI Radeon chipset implementations with add-on HDMI card
    (e. g. Asus M2A-VM HDMI) indicate the availability of a DDC even
    when the add-on card is not plugged in or HDMI is disabled in BIOS setup.
    In this case, drm_get_edid() and drm_edid_block_valid() periodically
    dump data and kernel errors into system log files and onto terminals.
    For these connectors DDC probing is extended by a check for a correct
    EDID header. Only in case a valid EDID header is also found, the
    (HDMI or DVI) connector will be used by the Radeon driver. This prevents
    the kernel driver from useless flooding of logs and terminal sessions with
    EDID dumps and error messages.
    This patch adds a flag 'requires_extended_probe' to the radeon_connector
    structure. In function radeon_connector_needs_extended_probe() this flag
    can be set on a chipset family/vendor/connector type specific basis.
    In addition, function radeon_ddc_probe() has been adapted to perform
    extended DDC probing if required by the connector's flag.
    Requires function drm_edid_header_is_valid() in DRM module provided by
    [PATCH] drm: Separate EDID Header Check from EDID Block Check.

    Tested for kernel 2.6.35, 2.6.38 and 3.0 on Asus M2A-VM HDMI board

    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=668196
    BugLink: http://bugs.launchpad.net/bugs/7228066

    Cc: <stable@kernel.org>
    Signed-off-by: Thomas Reim <reimth@gmail.com>
    Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
    Acked-by: Stephen Michaels <Stephen.Micheals@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

    Thomas Reim
     
  • Provides function drm_edid_header_is_valid() for EDID header check
    and replaces EDID header check part of function drm_edid_block_valid()
    by a call of drm_edid_header_is_valid().
    This is a prerequisite to extend DDC probing, e. g. in function
    radeon_ddc_probe() for Radeon devices, by a central EDID header check.

    Tested for kernel 2.6.35, 2.6.38 and 3.0

    Cc:
    Signed-off-by: Thomas Reim
    Reviewed-by: Alex Deucher
    Acked-by: Stephen Michaels
    Signed-off-by: Dave Airlie

    Thomas Reim
     
  • The struct drm_driver has some function pointers for irq. They are
    gpu specific and some functions aren't essential things. This can
    prevents creation of unnecessary dummy function for irq.

    Signed-off-by: Joonyoung Shim
    Signed-off-by: Kyungmin Park
    Signed-off-by: Dave Airlie

    Joonyoung Shim
     
  • The registered irq should be unregistered by free_irq() if
    irq_postinstall() returns the error after request_irq() is called
    successfully.

    [airlied: add vga switcheroo disable]

    Signed-off-by: Joonyoung Shim
    Signed-off-by: Kyungmin Park
    Signed-off-by: Dave Airlie

    Joonyoung Shim
     
  • kzalloc() can return NULL, so I added check for it

    Signed-off-by: Bojan Prtvar
    Signed-off-by: Dave Airlie

    Bojan Prtvar
     
  • Reg header files are generated so they are not cleaned automagically.
    They need to be added to the clean-files list.

    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Dave Airlie

    Fernando Luis Vázquez Cao
     
  • [airlied: move char declaration]

    Signed-off-by: Emil Velikov
    Signed-off-by: Dave Airlie

    Emil Velikov
     
  • …t/keithp/linux-2.6 into drm-fixes

    * 'drm-intel-next' of ssh://master.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: (42 commits)
    drm/i915: allow cache sharing policy control
    drm/i915/hdmi: HDMI source product description infoframe support
    drm/i915/hdmi: split infoframe setting from infoframe type code
    drm: track CEA version number if present
    drm/i915: Try enabling RC6 by default (again)
    Revert "drm/i915/dp: Zero the DPCD data before connection probe"
    drm/i915/dp: wait for previous AUX channel activity to clear
    drm/i915: don't use uninitialized EDID bpc values when picking pipe bpp
    drm/i915/pch: Save/restore PCH_PORT_HOTPLUG across suspend
    drm/i915: apply phase pointer override on SNB+ too
    drm/i915: Add quirk to disable SSC on Sony Vaio Y2
    drm/i915: provide more error output when mode sets fail
    drm/i915: add GPU max frequency control file
    i915: add Dell OptiPlex FX170 to intel_no_lvds
    drm/i915: Ignore GPU wedged errors while pinning scanout buffers
    drm/i915/hdmi: send AVI info frames on ILK+ as well
    drm/i915: fix CB tuning check for ILK+
    drm/i915: Flush other plane register writes
    drm/i915: flush plane control changes on ILK+ as well
    drm/i915: apply timing generator bug workaround on CPT and PPT
    ...

    Dave Airlie
     
  • The board has an lm63 compatible thermal chip, but no
    thermal chip entry in the vbios tables.

    Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=39513

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • This off by one range check was copy and pasted a couple places.
    It's not really harmful, but we should fix it anyway.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Dave Airlie

    Dan Carpenter