06 Jul, 2013

1 commit

  • Pull crypto update from Herbert Xu:
    - Do not idle omap device between crypto operations in one session.
    - Added sha224/sha384 shims for SSSE3.
    - More optimisations for camellia-aesni-avx2.
    - Removed defunct blowfish/twofish AVX2 implementations.
    - Added unaligned buffer self-tests.
    - Added PCLMULQDQ optimisation for CRCT10DIF.
    - Added support for Freescale's DCP co-processor
    - Misc fixes.

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (44 commits)
    crypto: testmgr - test hash implementations with unaligned buffers
    crypto: testmgr - test AEADs with unaligned buffers
    crypto: testmgr - test skciphers with unaligned buffers
    crypto: testmgr - check that entries in alg_test_descs are in correct order
    Revert "crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher"
    Revert "crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher"
    crypto: camellia-aesni-avx2 - tune assembly code for more performance
    hwrng: bcm2835 - fix MODULE_LICENSE tag
    hwrng: nomadik - use clk_prepare_enable()
    crypto: picoxcell - replace strict_strtoul() with kstrtoul()
    crypto: dcp - Staticize local symbols
    crypto: dcp - Use NULL instead of 0
    crypto: dcp - Use devm_* APIs
    crypto: dcp - Remove redundant platform_set_drvdata()
    hwrng: use platform_{get,set}_drvdata()
    crypto: omap-aes - Don't idle/start AES device between Encrypt operations
    crypto: crct10dif - Use PTR_RET
    crypto: ux500 - Cocci spatch "resource_size.spatch"
    crypto: sha256_ssse3 - add sha224 support
    crypto: sha512_ssse3 - add sha384 support
    ...

    Linus Torvalds
     

05 Jul, 2013

9 commits

  • Pull trivial tree updates from Jiri Kosina:
    "The usual stuff from trivial tree"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    treewide: relase -> release
    Documentation/cgroups/memory.txt: fix stat file documentation
    sysctl/net.txt: delete reference to obsolete 2.4.x kernel
    spinlock_api_smp.h: fix preprocessor comments
    treewide: Fix typo in printk
    doc: device tree: clarify stuff in usage-model.txt.
    open firmware: "/aliasas" -> "/aliases"
    md: bcache: Fixed a typo with the word 'arithmetic'
    irq/generic-chip: fix a few kernel-doc entries
    frv: Convert use of typedef ctl_table to struct ctl_table
    sgi: xpc: Convert use of typedef ctl_table to struct ctl_table
    doc: clk: Fix incorrect wording
    Documentation/arm/IXP4xx fix a typo
    Documentation/networking/ieee802154 fix a typo
    Documentation/DocBook/media/v4l fix a typo
    Documentation/video4linux/si476x.txt fix a typo
    Documentation/virtual/kvm/api.txt fix a typo
    Documentation/early-userspace/README fix a typo
    Documentation/video4linux/soc-camera.txt fix a typo
    lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment
    ...

    Linus Torvalds
     
  • Merge Kconfig menu diet patches from Dave Hansen:
    "I think the "Kernel Hacking" menu has gotten a bit out of hand. It is
    over 120 lines long on my system with everything enabled and options
    are scattered around it haphazardly.

    http://sr71.net/~dave/linux/kconfig-horror.png

    Let's try to introduce some sanity. This set takes that 120 lines
    down to 55 and makes it vastly easier to find some things. It's a
    start.

    This set stands on its own, but there is plenty of room for follow-up
    patches. The arch-specific debug options still end up getting stuck
    in the top-level "kernel hacking" menu. OPTIMIZE_INLINING, for
    instance, could obviously go in to the "compiler options" menu, but
    the fact that it is defined in arch/ in a separate Kconfig file keeps
    it on its own for the moment.

    The Signed-off-by's in here look funky. I changed employers while
    working on this set, so I have signoffs from both email addresses"

    * emailed patches from Dave Hansen :
    hang and lockup detection menu
    kconfig: consolidate printk options
    group locking debugging options
    consolidate compilation option configs
    consolidate runtime testing configs
    order memory debugging Kconfig options
    consolidate per-arch stack overflow debugging options

    Linus Torvalds
     
  • The hard/softlockup and hung-task entries take up 6 lines
    of screen real-estate when enabled. I bet folks don't
    mess with these _that_ often, so move them in a group
    down a level.

    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Same deal, take the printk-related things and hide them in a menu.
    This takes another 4 items out of the top-level menu.

    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184208.D9E5804D@kernel.stglabs.ibm.com

    There are quite a few of these, and we want to make sure that
    there is one-stop-shopping for lock debugging.

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original Post:

    http://lkml.kernel.org/r/20121214184207.6E00DDEC@kernel.stglabs.ibm.com

    Again, trying to come up with some common themes of the stuff in
    the kernel hacking menu... There are quite a few options to
    tweak compilation in some way, or perform extra compile-time
    checks. Give them their own menu.

    The diff here looks a bit funny... makes it look like I'm
    moving debugfs even though I'm actually moving the options on
    either side of it.

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184206.FC11422F@kernel.stglabs.ibm.com

    These runtime tests are great, except that there are a lot of them,
    and they are very rarely needed. Give them their own menu so that
    only the folks who need them will have to go looking for them.

    Note that there are some other runtime tests that are not in here,
    like for RCU or locking. This menu should only be used for tests
    that do not have a more appropriate home.

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184203.37E6C724@kernel.stglabs.ibm.com

    There are a *LOT* of memory debugging options. They are just scattered
    all over the "Kernel Hacking" menu. Sure, "memory debugging" is a very
    vague term and it's going to be hard to make absolute rules about what
    goes in here, but this has to be better than what we had before.

    This does, however, leave out the architecture-specific memory
    debugging options (like x86's DEBUG_SET_MODULE_RONX). There would need
    to be some substantial changes to move those in here. Kconfig can not
    easily mix arch-specific and generic options together: it really
    requires a file per-architecture, and I think having an
    arch/foo/Kconfig.debug-memory might be taking things a bit too far

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com

    Several architectures have similar stack debugging config options.
    They all pretty much do the same thing, some with slightly
    differing help text.

    This patch changes the architectures to instead enable a Kconfig
    boolean, and then use that boolean in the generic Kconfig.debug
    to present the actual menu option. This removes a bunch of
    duplication and adds consistency across arches.

    Signed-off-by: Dave Hansen
    Reviewed-by: H. Peter Anvin
    Reviewed-by: James Hogan
    Acked-by: Chris Metcalf [for tile]
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

04 Jul, 2013

5 commits

  • Merge first patch-bomb from Andrew Morton:
    - various misc bits
    - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
    distracted. There has been quite a bit of activity.
    - About half the MM queue
    - Some backlight bits
    - Various lib/ updates
    - checkpatch updates
    - zillions more little rtc patches
    - ptrace
    - signals
    - exec
    - procfs
    - rapidio
    - nbd
    - aoe
    - pps
    - memstick
    - tools/testing/selftests updates

    * emailed patches from Andrew Morton : (445 commits)
    tools/testing/selftests: don't assume the x bit is set on scripts
    selftests: add .gitignore for kcmp
    selftests: fix clean target in kcmp Makefile
    selftests: add .gitignore for vm
    selftests: add hugetlbfstest
    self-test: fix make clean
    selftests: exit 1 on failure
    kernel/resource.c: remove the unneeded assignment in function __find_resource
    aio: fix wrong comment in aio_complete()
    drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
    drivers/memstick/host/r592.c: convert to module_pci_driver
    drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
    pps-gpio: add device-tree binding and support
    drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
    drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
    drivers/parport/share.c: use kzalloc
    Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
    aoe: update internal version number to v83
    aoe: update copyright date
    aoe: perform I/O completions in parallel
    ...

    Linus Torvalds
     
  • We print a dump stack after idr_remove warning. This is useful to find
    the faulty piece of code. Let's do the same for ida_remove, as it would
    be equally useful there.

    [akpm@linux-foundation.org: convert the open-coded printk+dump_stack into WARN()]
    Signed-off-by: Jean Delvare
    Cc: Tejun Heo
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • __this_cpu_write doesn't need to be protected by spinlock, AS we are doing
    per cpu write with preempt disabled. And another reason to remove
    __this_cpu_write outside of spinlock: __percpu_counter_sum is not an
    accurate counter.

    Signed-off-by: Fan Du
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fan Du
     
  • Add functionality to serialize the output from dump_stack() to avoid
    mangling of the output when dump_stack is called simultaneously from
    multiple cpus.

    [akpm@linux-foundation.org: fix comment indenting, avoid inclusion of files - use where possiblem fix uniprocessor build (__dump_stack undefined), remove unneeded ifdef around smp.h inclusion]
    Signed-off-by: Alex Thorlton
    Reported-by: Russ Anderson
    Reviewed-by: Robin Holt
    Cc: Vineet Gupta
    Cc: David S. Miller
    Cc: Richard Kuo
    Cc: Jesper Nilsson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Thorlton
     
  • Pull "exotic" arch fixes from Geert Uytterhoeven:
    "This is a collection of several exotic architecture fixes, and a few
    other fixes for issues that were detected while doing the former"

    * 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (35 commits)
    lib: Move fonts from drivers/video/console/ to lib/fonts/
    console/font: Refactor font support code selection logic
    Revert "staging/solo6x10: depend on CONFIG_FONTS"
    input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
    score: Wire up asm-generic/xor.h
    score: Remove unneeded
    openrisc: Wire up asm-generic/xor.h
    h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
    h8300: Mark H83002 and H83048 CPU support broken
    h8300: Switch h8300 to drivers/Kconfig
    h8300: Limit timer channel ranges in Kconfig
    h8300: Wire up asm-generic/xor.h
    h8300: Fill the system call table using a CALL() macro
    h8300: Fix
    h8300: Hardcode symbol prefixes in asm sources
    h8300: add missing definition for read_barries_depends()
    frv: head.S - Remove commented-out initialization code
    cris: Wire up asm-generic/vga.h
    parport: disable PC-style parallel port support on cris
    console: Disable VGA text console support on cris
    ...

    Linus Torvalds
     

03 Jul, 2013

4 commits

  • Pull per-cpu changes from Tejun Heo:
    "This pull request contains Kent's per-cpu reference counter. It has
    gone through several iterations since the last time and the dynamic
    allocation is gone.

    The usual usage is relatively straight-forward although async kill
    confirm interface, which is not used int most cases, is somewhat icky.
    There also are some interface concerns - e.g. I'm not sure about
    passing in @relesae callback during init as that becomes funny when we
    later implement synchronous kill_and_drain - but nothing too serious
    and it's quite useable now.

    cgroup_subsys_state refcnting has already been converted and we should
    convert module refcnt (Kent?)"

    * 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu-refcount: use RCU-sched insted of normal RCU
    percpu-refcount: implement percpu_tryget() along with percpu_ref_kill_and_confirm()
    percpu-refcount: implement percpu_ref_cancel_init()
    percpu-refcount: add __must_check to percpu_ref_init() and don't use ACCESS_ONCE() in percpu_ref_kill_rcu()
    percpu-refcount: cosmetic updates
    percpu-refcount: consistently use plain (non-sched) RCU
    percpu-refcount: Don't use silly cmpxchg()
    percpu: implement generic percpu refcounting

    Linus Torvalds
     
  • Pull WW mutex support from Ingo Molnar:
    "This tree adds support for wound/wait style locks, which the graphics
    guys would like to make use of in the TTM graphics subsystem.

    Wound/wait mutexes are used when other multiple lock acquisitions of a
    similar type can be done in an arbitrary order. The deadlock handling
    used here is called wait/wound in the RDBMS literature: The older
    tasks waits until it can acquire the contended lock. The younger
    tasks needs to back off and drop all the locks it is currently
    holding, ie the younger task is wounded.

    See this LWN.net description of W/W mutexes:

    https://lwn.net/Articles/548909/

    The comments there outline specific usecases for this facility (which
    have already been implemented for the DRM tree).

    Also see Documentation/ww-mutex-design.txt for more details"

    * 'core-mutexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    locking-selftests: Handle unexpected failures more strictly
    mutex: Add more w/w tests to test EDEADLK path handling
    mutex: Add more tests to lib/locking-selftest.c
    mutex: Add w/w tests to lib/locking-selftest.c
    mutex: Add w/w mutex slowpath debugging
    mutex: Add support for wound/wait style locks
    arch: Make __mutex_fastpath_lock_retval return whether fastpath succeeded or not

    Linus Torvalds
     
  • …ernel/git/arm/arm-soc

    Pull ARM SoC non-cricitical bug fixes from Arnd Bergmann:
    "These are various bug fixes that were not considered important enough
    for merging into 3.10.

    The majority of the ARM fixes are for the OMAP and at91 platforms, and
    there is another set of bug fixes for device drivers that resolve
    'randconfig' build errors and that the subsystem maintainers either
    did not pick up or preferred to get merged through the arm-soc tree."

    * tag 'fixes-non-critical-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
    ARM: at91/PMC: use at91_usb_rate() for UTMI PLL
    ARM: at91/PMC: fix at91sam9n12 USB FS init
    ARM: at91/PMC: at91sam9n12 family has a PLLB
    ARM: at91/PMC: sama5d3 family doesn't have a PLLB
    ARM: tegra: fix section mismatch in tegra_pmc_parse_dt
    ARM: mxs: don't select HAVE_PWM
    ARM: mxs: stub out mxs_pm_init for !CONFIG_PM
    cpuidle: calxeda: select ARM_CPU_SUSPEND
    ARM: mvebu: fix length of ethernet registers in mv78260 dtsi
    ARM: at91: cpuidle: Fix target_residency
    ARM: at91: fix at91_extern_irq usage for non-dt boards
    ARM: sirf: use CONFIG_SIRF rather than CONFIG_PRIMA2 where necessary
    clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change
    X.509: do not emit any informational output
    mtd: omap2: allow bulding as a module
    [SCSI] nsp32: use mdelay instead of large udelay constants
    hwrng: bcm2835: fix MODULE_LICENSE tag
    ARM: at91: Change the internal SRAM memory type MT_MEMORY_NONCACHED
    ARM: at91: Fix link breakage when !CONFIG_PHYLIB
    MAINTAINERS: Add exynos filename match to ARM/S5P EXYNOS ARM ARCHITECTURES
    ...

    Linus Torvalds
     
  • Pull driver core updates from Greg KH:
    "Here's the big driver core merge for 3.11-rc1

    Lots of little things, and larger firmware subsystem updates, all
    described in the shortlog. Nice thing here is that we finally get rid
    of CONFIG_HOTPLUG, after 10+ years, thanks to Stephen Rohtwell (it had
    been always on for a number of kernel releases, now it's just
    removed)"

    * tag 'driver-core-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (27 commits)
    driver core: device.h: fix doc compilation warnings
    firmware loader: fix another compile warning with PM_SLEEP unset
    build some drivers only when compile-testing
    firmware loader: fix compile warning with PM_SLEEP set
    kobject: sanitize argument for format string
    sysfs_notify is only possible on file attributes
    firmware loader: simplify holding module for request_firmware
    firmware loader: don't export cache_firmware and uncache_firmware
    drivers/base: Use attribute groups to create sysfs memory files
    firmware loader: fix compile warning
    firmware loader: fix build failure with !CONFIG_FW_LOADER_USER_HELPER
    Documentation: Updated broken link in HOWTO
    Finally eradicate CONFIG_HOTPLUG
    driver core: firmware loader: kill FW_ACTION_NOHOTPLUG requests before suspend
    driver core: firmware loader: don't cache FW_ACTION_NOHOTPLUG firmware
    Documentation: Tidy up some drivers/base/core.c kerneldoc content.
    platform_device: use a macro instead of platform_driver_register
    firmware: move EXPORT_SYMBOL annotations
    firmware: Avoid deadlock of usermodehelper lock at shutdown
    dell_rbu: Select CONFIG_FW_LOADER_USER_HELPER explicitly
    ...

    Linus Torvalds
     

28 Jun, 2013

1 commit

  • Several drivers need font support independent of CONFIG_VT, cfr. commit
    9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
    support code selection logic").
    Hence move the fonts and their support logic from drivers/video/console/ to
    its own library directory lib/fonts/.
    This also allows to limit processing of drivers/video/console/Makefile to
    CONFIG_VT=y again.

    [Kevin Hilman : Update arch/arm/boot/compressed/Makefile]
    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

26 Jun, 2013

6 commits

  • When CONFIG_PROVE_LOCKING is not enabled, more tests are
    expected to pass unexpectedly, but there no tests that should
    start to fail that pass with CONFIG_PROVE_LOCKING enabled.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113141.4001.54331.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • None of the ww_mutex codepaths should be taken in the 'normal'
    mutex calls. The easiest way to verify this is by using the
    normal mutex calls, and making sure o.ctx is unmodified.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113130.4001.45423.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • This stresses the lockdep code in some ways specifically useful
    to ww_mutexes. It adds checks for most of the common locking
    errors.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113124.4001.23186.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • Injects EDEADLK conditions at pseudo-random interval, with
    exponential backoff up to UINT_MAX (to ensure that every lock
    operation still completes in a reasonable time).

    This way we can test the wound slowpath even for ww mutex users
    where contention is never expected, and the ww deadlock
    avoidance algorithm is only needed for correctness against
    malicious userspace. An example would be protecting kernel
    modesetting properties, which thanks to single-threaded X isn't
    really expected to contend, ever.

    I've looked into using the CONFIG_FAULT_INJECTION
    infrastructure, but decided against it for two reasons:

    - EDEADLK handling is mandatory for ww mutex users and should
    never affect the outcome of a syscall. This is in contrast to -ENOMEM
    injection. So fine configurability isn't required.

    - The fault injection framework only allows to set a simple
    probability for failure. Now the probability that a ww mutex acquire
    stage with N locks will never complete (due to too many injected
    EDEADLK backoffs) is zero. But the expected number of ww_mutex_lock
    operations for the completely uncontended case would be O(exp(N)).
    The per-acuiqire ctx exponential backoff solution choosen here only
    results in O(log N) overhead due to injection and so O(log N * N)
    lock operations. This way we can fail with high probability (and so
    have good test coverage even for fancy backoff and lock acquisition
    paths) without running into patalogical cases.

    Note that EDEADLK will only ever be injected when we managed to
    acquire the lock. This prevents any behaviour changes for users
    which rely on the EALREADY semantics.

    Signed-off-by: Daniel Vetter
    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113117.4001.21681.stgit@patser
    Signed-off-by: Ingo Molnar

    Daniel Vetter
     
  • Wound/wait mutexes are used when other multiple lock
    acquisitions of a similar type can be done in an arbitrary
    order. The deadlock handling used here is called wait/wound in
    the RDBMS literature: The older tasks waits until it can acquire
    the contended lock. The younger tasks needs to back off and drop
    all the locks it is currently holding, i.e. the younger task is
    wounded.

    For full documentation please read Documentation/ww-mutex-design.txt.

    References: https://lwn.net/Articles/548909/
    Signed-off-by: Maarten Lankhorst
    Acked-by: Daniel Vetter
    Acked-by: Rob Clark
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/51C8038C.9000106@canonical.com
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     

19 Jun, 2013

1 commit

  • When building a kernel using 'make -s', I expect to see an empty output,
    except for build warnings and errors. The build_OID_registry code
    always prints one line when run, which is not helpful to most people
    building the kernels, and which makes it harder to automatically
    check for build warnings.

    Let's just remove the one line output.

    Signed-off-by: Arnd Bergmann
    Cc: David Howells
    Cc: Rusty Russell

    Arnd Bergmann
     

18 Jun, 2013

3 commits


17 Jun, 2013

1 commit

  • percpu-refcount was incorrectly using preempt_disable/enable() for RCU
    critical sections against call_rcu(). 6a24474da8 ("percpu-refcount:
    consistently use plain (non-sched) RCU") fixed it by converting the
    preepmtion operations with rcu_read_[un]lock() citing that there isn't
    any advantage in using sched-RCU over using the usual one; however,
    rcu_read_[un]lock() for the preemptible RCU implementation -
    CONFIG_TREE_PREEMPT_RCU, chosen when CONFIG_PREEMPT - are slightly
    more expensive than preempt_disable/enable().

    In a contrived microbench which repeats the followings,

    - percpu_ref_get()
    - copy 32 bytes of data into percpu buffer
    - percpu_put_get()
    - copy 32 bytes of data into percpu buffer

    rcu_read_[un]lock() used in percpu_ref_get/put() makes it go slower by
    about 15% when compared to using sched-RCU.

    As the RCU critical sections are extremely short, using sched-RCU
    shouldn't have any latency implications. Convert to RCU-sched.

    Signed-off-by: Tejun Heo
    Acked-by: Kent Overstreet
    Acked-by: "Paul E. McKenney"
    Cc: Michal Hocko
    Cc: Rusty Russell

    Tejun Heo
     

14 Jun, 2013

3 commits

  • Implement percpu_tryget() which stops giving out references once the
    percpu_ref is visible as killed. Because the refcnt is per-cpu,
    different CPUs will start to see a refcnt as killed at different
    points in time and tryget() may continue to succeed on subset of cpus
    for a while after percpu_ref_kill() returns.

    For use cases where it's necessary to know when all CPUs start to see
    the refcnt as dead, percpu_ref_kill_and_confirm() is added. The new
    function takes an extra argument @confirm_kill which is invoked when
    the refcnt is guaranteed to be viewed as killed on all CPUs.

    While this isn't the prettiest interface, it doesn't force synchronous
    wait and is much safer than requiring the caller to do its own
    call_rcu().

    v2: Patch description rephrased to emphasize that tryget() may
    continue to succeed on some CPUs after kill() returns as suggested
    by Kent.

    v3: Function comment in percpu_ref_kill_and_confirm() updated warning
    people to not depend on the implied RCU grace period from the
    confirm callback as it's an implementation detail.

    Signed-off-by: Tejun Heo
    Slightly-Grumpily-Acked-by: Kent Overstreet

    Tejun Heo
     
  • Normally, percpu_ref_init() initializes and percpu_ref_kill()
    initiates destruction which completes asynchronously. The
    asynchronous destruction can be problematic in init failure path where
    the caller wants to destroy half-constructed object - distinguishing
    half-constructed objects from the usual release method can be painful
    for complex objects.

    This patch implements percpu_ref_cancel_init() which synchronously
    destroys the percpu_ref without invoking release. To avoid
    unintentional misuses, the function requires the ref to have finished
    percpu_ref_init() but never used and triggers WARN otherwise.

    v2: Explain the weird name and usage restriction in the function
    comment.

    Signed-off-by: Tejun Heo
    Acked-by: Kent Overstreet

    Tejun Heo
     
  • …() in percpu_ref_kill_rcu()

    Two small changes.

    * Unlike most init functions, percpu_ref_init() allocates memory and
    may fail. Let's mark it with __must_check in case the caller
    forgets.

    * percpu_ref_kill_rcu() is unnecessarily using ACCESS_ONCE() to
    dereference @ref->pcpu_count, which can be misleading. The pointer
    is guaranteed to be valid and visible and can't change underneath
    the function. Drop ACCESS_ONCE().

    Signed-off-by: Tejun Heo <tj@kernel.org>

    Tejun Heo
     

13 Jun, 2013

2 commits

  • * s/percpu_ref_release/percpu_ref_func_t/ as it's customary to have _t
    postfix for types and the type is gonna be used for a different type
    of callback too.

    * Add @ARG to function comments.

    * Drop unnecessary and unaligned indentation from percpu_ref_init()
    function comment.

    Signed-off-by: Tejun Heo
    Acked-by: Kent Overstreet

    Tejun Heo
     
  • For 'while' looping, need stop when 'nbytes == 0', or will cause issue.
    ('nbytes' is size_t which is always bigger or equal than zero).

    The related warning: (with EXTRA_CFLAGS=-W)

    lib/mpi/mpicoder.c:40:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

    Signed-off-by: Chen Gang
    Cc: Rusty Russell
    Cc: David Howells
    Cc: James Morris
    Cc: Andy Shevchenko
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gang
     

08 Jun, 2013

1 commit

  • Unlike kobject_set_name(), the kset_create_and_add() interface does not
    provide a way to use format strings, so make sure that the interface
    cannot be abused accidentally. It looks like all current callers use
    static strings, so there's no existing flaw.

    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

06 Jun, 2013

1 commit

  • Since we have at least one user of this function outside of CONFIG_NET
    scope, we have to provide this function independently. The proposed
    solution is to move it under lib/net_utils.c with corresponding
    configuration variable and select wherever it is needed.

    Signed-off-by: Andy Shevchenko
    Reported-by: Arnd Bergmann
    Acked-by: David S. Miller
    Acked-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     

05 Jun, 2013

1 commit


04 Jun, 2013

1 commit

  • The cmpxchg() was just to ensure the debug check didn't race, which was
    a bit excessive. The caller is supposed to do the appropriate
    synchronization, which means percpu_ref_kill() can just do a simple
    store.

    Signed-off-by: Kent Overstreet
    Signed-off-by: Tejun Heo

    Kent Overstreet