26 Jan, 2013

1 commit


23 Jan, 2013

2 commits

  • The ERR_PTR() and IS_ERR() macros used by the devm_ioremap_resource()
    function are defined in the linux/err.h header. On ARM this seems to be
    pulled in by one of the other headers but the build fails at least on
    OpenRISC.

    Signed-off-by: Thierry Reding
    Reported-by: kbuild test robot
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     
  • The devm_request_and_ioremap() function is very useful and helps avoid a
    whole lot of boilerplate. However, one issue that keeps popping up is
    its lack of a specific error code to determine which of the steps that
    it performs failed. Furthermore, while the function gives an example and
    suggests what error code to return on failure, a wide variety of error
    codes are used throughout the tree.

    In an attempt to fix these problems, this patch adds a new function that
    drivers can transition to. The devm_ioremap_resource() returns a pointer
    to the remapped I/O memory on success or an ERR_PTR() encoded error code
    on failure. Callers can check for failure using IS_ERR() and determine
    its cause by extracting the error code using PTR_ERR().

    devm_request_and_ioremap() is implemented as a wrapper around the new
    API and return NULL on failure as before. This ensures that backwards
    compatibility is maintained until all users have been converted to the
    new API, at which point the old devm_request_and_ioremap() function
    should be removed.

    A semantic patch is included which can be used to convert from the old
    devm_request_and_ioremap() API to the new devm_ioremap_resource() API.
    Some non-trivial cases may require manual intervention, though.

    Signed-off-by: Thierry Reding
    Cc: Arnd Bergmann
    Acked-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     

21 Jan, 2013

1 commit

  • Pull module fixes and a virtio block fix from Rusty Russell:
    "Various minor fixes, but a slightly more complex one to fix the
    per-cpu overload problem introduced recently by kvm id changes."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    module: put modules in list much earlier.
    module: add new state MODULE_STATE_UNFORMED.
    module: prevent warning when finit_module a 0 sized file
    virtio-blk: Don't free ida when disk is in use

    Linus Torvalds
     

18 Jan, 2013

5 commits

  • This is to fix up a build problem with a wireless driver due to the
    dynamic-debug patches in this branch.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Ma noted that dynamic-debug is silent about many query errors, so add
    pr_err()s to explain those errors, and tweak a few others. Also parse
    flags 1st, so that match-spec errs are slightly clearer.

    CC: Jianpeng Ma
    CC: Joe Perches
    Signed-off-by: Jim Cromie
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • Introduce print_hex_dump_debug() that can be dynamically controlled, similar to
    pr_debug.

    Also, make print_hex_dump_bytes() dynamically controlled

    Implement only 'p' flag (_DPRINTK_FLAGS_PRINT) to keep it simple since hex dump prints
    multiple lines and long prefix would impact readability.
    To provide line/file etc. information, use pr_debug or similar
    before/after print_hex_dump_debug()

    Signed-off-by: Vladimir Kondratiev
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Vladimir Kondratiev
     
  • vpr_info_dq should be a function and vpr_info should have
    a do {} while (0)

    Add missing newlines to pr_s.

    Miscellaneous neatening too.
    braces, coalescing formats, alignments, etc...

    Signed-off-by: Joe Perches
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     
  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Andrew Morton
    Acked-by: Paul E. McKenney
    CC: Dmitry Kasatkin
    CC: James Morris
    CC: "Michael S. Tsirkin"
    CC: Akinobu Mita
    CC: Ingo Molnar
    Cc: Greg Kroah-Hartman
    Signed-off-by: Kees Cook
    Acked-by: Catalin Marinas
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

12 Jan, 2013

3 commits

  • Prarit's excellent bug report:
    > In recent Fedora releases (F17 & F18) some users have reported seeing
    > messages similar to
    >
    > [ 15.478160] kvm: Could not allocate 304 bytes percpu data
    > [ 15.478174] PERCPU: allocation failed, size=304 align=32, alloc from
    > reserved chunk failed
    >
    > during system boot. In some cases, users have also reported seeing this
    > message along with a failed load of other modules.
    >
    > What is happening is systemd is loading an instance of the kvm module for
    > each cpu found (see commit e9bda3b). When the module load occurs the kernel
    > currently allocates the modules percpu data area prior to checking to see
    > if the module is already loaded or is in the process of being loaded. If
    > the module is already loaded, or finishes load, the module loading code
    > releases the current instance's module's percpu data.

    Now we have a new state MODULE_STATE_UNFORMED, we can insert the
    module into the list (and thus guarantee its uniqueness) before we
    allocate the per-cpu region.

    Reported-by: Prarit Bhargava
    Signed-off-by: Rusty Russell
    Tested-by: Prarit Bhargava

    Rusty Russell
     
  • lib/rbtree.c declared __rb_erase_color() as __always_inline void, and
    then exported it with EXPORT_SYMBOL.

    This was because __rb_erase_color() must be exported for augmented
    rbtree users, but it must also be inlined into rb_erase() so that the
    dummy callback can get optimized out of that call site.

    (Actually with a modern compiler, none of the dummy callback functions
    should even be generated as separate text functions).

    The above usage is legal C, but it was unusual enough for some compilers
    to warn about it. This change makes things more explicit, with a static
    __always_inline ____rb_erase_color function for use in rb_erase(), and a
    separate non-inline __rb_erase_color function for use in
    rb_erase_augmented call sites.

    Signed-off-by: Michel Lespinasse
    Reported-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     
  • In some cases, free_irq_cpu_rmap() is called while holding a lock (eg
    rtnl). This can lead to deadlocks, because it invokes
    flush_scheduled_work() which ends up waiting for whole system workqueue
    to flush, but some pending works might try to acquire the lock we are
    already holding.

    This commit uses reference-counting to replace
    irq_run_affinity_notifiers(). It also removes
    irq_run_affinity_notifiers() altogether.

    [akpm@linux-foundation.org: eliminate free_cpu_rmap, rename cpu_rmap_reclaim() to cpu_rmap_release(), propagate kref_put() retval from cpu_rmap_put()]
    Signed-off-by: David Decotigny
    Reviewed-by: Ben Hutchings
    Acked-by: Eric Dumazet
    Reviewed-by: Josh Triplett
    Cc: "David S. Miller"
    Cc: Or Gerlitz
    Acked-by: Amir Vadai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Decotigny
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the last of the __dev* markings from the kernel from
    a variety of different, tiny, places.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

21 Dec, 2012

2 commits

  • The atomic64 library uses a handful of static spin locks to implement
    atomic 64-bit operations on architectures without support for atomic
    64-bit instructions.

    Unfortunately, the spinlocks are initialized in a pure initcall and that
    is too late for the vfs namespace code which wants to use atomic64
    operations before the initcall is run.

    This became a problem as of commit 8823c079ba71: "vfs: Add setns support
    for the mount namespace".

    This leads to BUG messages such as:

    BUG: spinlock bad magic on CPU#0, swapper/0/0
    lock: atomic64_lock+0x240/0x400, .magic: 00000000, .owner: /-1, .owner_cpu: 0
    do_raw_spin_lock+0x158/0x198
    _raw_spin_lock_irqsave+0x4c/0x58
    atomic64_add_return+0x30/0x5c
    alloc_mnt_ns.clone.14+0x44/0xac
    create_mnt_ns+0xc/0x54
    mnt_init+0x120/0x1d4
    vfs_caches_init+0xe0/0x10c
    start_kernel+0x29c/0x300

    coming out early on during boot when spinlock debugging is enabled.

    Fix this by initializing the spinlocks statically at compile time.

    Reported-and-tested-by: Vaibhav Bedia
    Tested-by: Tony Lindgren
    Cc: Eric W. Biederman
    Signed-off-by: Stephen Boyd
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Pull IOMMU updates from Joerg Roedel:
    "A few new features this merge-window. The most important one is
    probably, that dma-debug now warns if a dma-handle is not checked with
    dma_mapping_error by the device driver. This requires minor changes
    to some architectures which make use of dma-debug. Most of these
    changes have the respective Acks by the Arch-Maintainers.

    Besides that there are updates to the AMD IOMMU driver for refactor
    the IOMMU-Groups support and to make sure it does not trigger a
    hardware erratum.

    The OMAP changes (for which I pulled in a branch from Tony Lindgren's
    tree) have a conflict in linux-next with the arm-soc tree. The
    conflict is in the file arch/arm/mach-omap2/clock44xx_data.c which is
    deleted in the arm-soc tree. It is safe to delete the file too so
    solve the conflict. Similar changes are done in the arm-soc tree in
    the common clock framework migration. A missing hunk from the patch
    in the IOMMU tree will be submitted as a seperate patch when the
    merge-window is closed."

    * tag 'iommu-updates-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (29 commits)
    ARM: dma-mapping: support debug_dma_mapping_error
    ARM: OMAP4: hwmod data: ipu and dsp to use parent clocks instead of leaf clocks
    iommu/omap: Adapt to runtime pm
    iommu/omap: Migrate to hwmod framework
    iommu/omap: Keep mmu enabled when requested
    iommu/omap: Remove redundant clock handling on ISR
    iommu/amd: Remove obsolete comment
    iommu/amd: Don't use 512GB pages
    iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
    iommu/tegra: gart: Move bus_set_iommu after probe for multi arch
    iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
    tile: dma_debug: add debug_dma_mapping_error support
    sh: dma_debug: add debug_dma_mapping_error support
    powerpc: dma_debug: add debug_dma_mapping_error support
    mips: dma_debug: add debug_dma_mapping_error support
    microblaze: dma-mapping: support debug_dma_mapping_error
    ia64: dma_debug: add debug_dma_mapping_error support
    c6x: dma_debug: add debug_dma_mapping_error support
    ARM64: dma_debug: add debug_dma_mapping_error support
    intel-iommu: Prevent devices with RMRRs from being placed into SI Domain
    ...

    Linus Torvalds
     

19 Dec, 2012

3 commits

  • Pull module update from Rusty Russell:
    "Nothing all that exciting; a new module-from-fd syscall for those who
    want to verify the source of the module (ChromeOS) and/or use standard
    IMA on it or other security hooks."

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    MODSIGN: Fix kbuild output when using default extra_certificates
    MODSIGN: Avoid using .incbin in C source
    modules: don't hand 0 to vmalloc.
    module: Remove a extra null character at the top of module->strtab.
    ASN.1: Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants
    ASN.1: Define indefinite length marker constant
    moduleparam: use __UNIQUE_ID()
    __UNIQUE_ID()
    MODSIGN: Add modules_sign make target
    powerpc: add finit_module syscall.
    ima: support new kernel module syscall
    add finit_module syscall to asm-generic
    ARM: add finit_module syscall to ARM
    security: introduce kernel_module_from_file hook
    module: add flags arg to sys_finit_module()
    module: add syscall to load module from fd

    Linus Torvalds
     
  • Pull powerpc update from Benjamin Herrenschmidt:
    "The main highlight is probably some base POWER8 support. There's more
    to come such as transactional memory support but that will wait for
    the next one.

    Overall it's pretty quiet, or rather I've been pretty poor at picking
    things up from patchwork and reviewing them this time around and Kumar
    no better on the FSL side it seems..."

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (73 commits)
    powerpc+of: Rename and fix OF reconfig notifier error inject module
    powerpc: mpc5200: Add a3m071 board support
    powerpc/512x: don't compile any platform DIU code if the DIU is not enabled
    powerpc/mpc52xx: use module_platform_driver macro
    powerpc+of: Export of_reconfig_notifier_[register,unregister]
    powerpc/dma/raidengine: add raidengine device
    powerpc/iommu/fsl: Add PAMU bypass enable register to ccsr_guts struct
    powerpc/mpc85xx: Change spin table to cached memory
    powerpc/fsl-pci: Add PCI controller ATMU PM support
    powerpc/86xx: fsl_pcibios_fixup_bus requires CONFIG_PCI
    drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS]
    powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers
    powerpc: Disable relocation on exceptions when kexecing
    powerpc: Enable relocation on during exceptions at boot
    powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
    powerpc: Add wrappers to enable/disable relocation on exceptions
    powerpc: Add set_mode hcall
    powerpc: Setup relocation on exceptions for bare metal systems
    powerpc: Move initial mfspr LPCR out of __init_LPCR
    powerpc: Add relocation on exception vector handlers
    ...

    Linus Torvalds
     
  • Pull md update from Neil Brown:
    "Mostly just little fixes. Probably biggest part is AVX accelerated
    RAID6 calculations."

    * tag 'md-3.8' of git://neil.brown.name/md:
    md/raid5: add blktrace calls
    md/raid5: use async_tx_quiesce() instead of open-coding it.
    md: Use ->curr_resync as last completed request when cleanly aborting resync.
    lib/raid6: build proper files on corresponding arch
    lib/raid6: Add AVX2 optimized gen_syndrome functions
    lib/raid6: Add AVX2 optimized recovery functions
    md: Update checkpoint of resync/recovery based on time.
    md:Add place to update ->recovery_cp.
    md.c: re-indent various 'switch' statements.
    md: close race between removing and adding a device.
    md: removed unused variable in calc_sb_1_csm.

    Linus Torvalds
     

18 Dec, 2012

16 commits

  • Merge misc patches from Andrew Morton:
    "Incoming:

    - lots of misc stuff

    - backlight tree updates

    - lib/ updates

    - Oleg's percpu-rwsem changes

    - checkpatch

    - rtc

    - aoe

    - more checkpoint/restart support

    I still have a pile of MM stuff pending - Pekka should be merging
    later today after which that is good to go. A number of other things
    are twiddling thumbs awaiting maintainer merges."

    * emailed patches from Andrew Morton : (180 commits)
    scatterlist: don't BUG when we can trivially return a proper error.
    docs: update documentation about /proc//fdinfo/ fanotify output
    fs, fanotify: add @mflags field to fanotify output
    docs: add documentation about /proc//fdinfo/ output
    fs, notify: add procfs fdinfo helper
    fs, exportfs: add exportfs_encode_inode_fh() helper
    fs, exportfs: escape nil dereference if no s_export_op present
    fs, epoll: add procfs fdinfo helper
    fs, eventfd: add procfs fdinfo helper
    procfs: add ability to plug in auxiliary fdinfo providers
    tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test
    breakpoint selftests: print failure status instead of cause make error
    kcmp selftests: print fail status instead of cause make error
    kcmp selftests: make run_tests fix
    mem-hotplug selftests: print failure status instead of cause make error
    cpu-hotplug selftests: print failure status instead of cause make error
    mqueue selftests: print failure status instead of cause make error
    vm selftests: print failure status instead of cause make error
    ubifs: use prandom_bytes
    mtd: nandsim: use prandom_bytes
    ...

    Linus Torvalds
     
  • There is absolutely no reason to crash the kernel when we have a
    perfectly good return value already available to use for conveying
    failure status.

    Let's return an error code instead of crashing the kernel: that sounds
    like a much better plan.

    [akpm@linux-foundation.org: s/E2BIG/EINVAL/]
    Signed-off-by: Nick Bowler
    Cc: Maxim Levitsky
    Cc: Tejun Heo
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Bowler
     
  • Add functions to get the requested number of pseudo-random bytes.

    The difference from get_random_bytes() is that it generates pseudo-random
    numbers by prandom_u32(). It doesn't consume the entropy pool, and the
    sequence is reproducible if the same rnd_state is used. So it is suitable
    for generating random bytes for testing.

    Signed-off-by: Akinobu Mita
    Cc: "Theodore Ts'o"
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: David Woodhouse
    Cc: Eilon Greenstein
    Cc: David Laight
    Cc: Michel Lespinasse
    Cc: Robert Love
    Cc: Valdis Kletnieks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This renames all random32 functions to have 'prandom_' prefix as follows:

    void prandom_seed(u32 seed); /* rename from srandom32() */
    u32 prandom_u32(void); /* rename from random32() */
    void prandom_seed_state(struct rnd_state *state, u64 seed);
    /* rename from prandom32_seed() */
    u32 prandom_u32_state(struct rnd_state *state);
    /* rename from prandom32() */

    The purpose of this renaming is to prevent some kernel developers from
    assuming that prandom32() and random32() might imply that only
    prandom32() was the one using a pseudo-random number generator by
    prandom32's "p", and the result may be a very embarassing security
    exposure. This concern was expressed by Theodore Ts'o.

    And furthermore, I'm going to introduce new functions for getting the
    requested number of pseudo-random bytes. If I continue to use both
    prandom32 and random32 prefixes for these functions, the confusion
    is getting worse.

    As a result of this renaming, "prandom_" is the common prefix for
    pseudo-random number library.

    Currently, srandom32() and random32() are preserved because it is
    difficult to rename too many users at once.

    Signed-off-by: Akinobu Mita
    Cc: "Theodore Ts'o"
    Cc: Robert Love
    Cc: Michel Lespinasse
    Cc: Valdis Kletnieks
    Cc: David Laight
    Cc: Adrian Hunter
    Cc: Artem Bityutskiy
    Cc: David Woodhouse
    Cc: Eilon Greenstein
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Update the documentation for simple_strto* to reflect that it has been
    obsoleted and advise the usage of kstrto*.

    Signed-off-by: Eldad Zack
    Cc: J. Bruce Fields
    Cc: Joe Perches
    Cc: Randy Dunlap
    Cc: Alexey Dobriyan
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eldad Zack
     
  • As Bruce Fields pointed out, kstrto* is currently lacking kerneldoc
    comments. This patch adds kerneldoc comments to common variants of
    kstrto*: kstrto(u)l, kstrto(u)ll and kstrto(u)int.

    Signed-off-by: Eldad Zack
    Cc: J. Bruce Fields
    Cc: Joe Perches
    Cc: Randy Dunlap
    Cc: Alexey Dobriyan
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eldad Zack
     
  • Fix this warning:

    lib/rbtree_test.c: In function `check':
    lib/rbtree_test.c:121: warning: `blacks' may be used uninitialized in this function

    Signed-off-by: Cong Ding
    Cc: Michel Lespinasse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cong Ding
     
  • Currently only block_dev and uprobes use percpu_rw_semaphore,
    add the config option selected by BLOCK || UPROBES.

    Signed-off-by: Oleg Nesterov
    Cc: Anton Arapov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Mikulas Patocka
    Cc: "Paul E. McKenney"
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Add lockdep annotations. Not only this can help to find the potential
    problems, we do not want the false warnings if, say, the task takes two
    different percpu_rw_semaphore's for reading. IOW, at least ->rw_sem
    should not use a single class.

    This patch exposes this internal lock to lockdep so that it represents the
    whole percpu_rw_semaphore. This way we do not need to add another "fake"
    ->lockdep_map and lock_class_key. More importantly, this also makes the
    output from lockdep much more understandable if it finds the problem.

    In short, with this patch from lockdep pov percpu_down_read() and
    percpu_up_read() acquire/release ->rw_sem for reading, this matches the
    actual semantics. This abuses __up_read() but I hope this is fine and in
    fact I'd like to have down_read_no_lockdep() as well,
    percpu_down_read_recursive_readers() will need it.

    Signed-off-by: Oleg Nesterov
    Cc: Anton Arapov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Mikulas Patocka
    Cc: "Paul E. McKenney"
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • percpu_rw_semaphore->writer_mutex was only added to simplify the initial
    rewrite, the only thing it protects is clear_fast_ctr() which otherwise
    could be called by multiple writers. ->rw_sem is enough to serialize the
    writers.

    Kill this mutex and add "atomic_t write_ctr" instead. The writers
    increment/decrement this counter, the readers check it is zero instead of
    mutex_is_locked().

    Move atomic_add(clear_fast_ctr(), slow_read_ctr) under down_write() to
    avoid the race with other writers. This is a bit sub-optimal, only the
    first writer needs this and we do not need to exclude the readers at this
    stage. But this is simple, we do not want another internal lock until we
    add more features.

    And this speeds up the write-contended case. Before this patch the racing
    writers sleep in synchronize_sched_expedited() sequentially, with this
    patch multiple synchronize_sched_expedited's can "overlap" with each
    other. Note: we can do more optimizations, this is only the first step.

    Signed-off-by: Oleg Nesterov
    Cc: Anton Arapov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Mikulas Patocka
    Cc: "Paul E. McKenney"
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Currently the writer does msleep() plus synchronize_sched() 3 times to
    acquire/release the semaphore, and during this time the readers are
    blocked completely. Even if the "write" section was not actually started
    or if it was already finished.

    With this patch down_write/up_write does synchronize_sched() twice and
    down_read/up_read are still possible during this time, just they use the
    slow path.

    percpu_down_write() first forces the readers to use rw_semaphore and
    increment the "slow" counter to take the lock for reading, then it
    takes that rw_semaphore for writing and blocks the readers.

    Also. With this patch the code relies on the documented behaviour of
    synchronize_sched(), it doesn't try to pair synchronize_sched() with
    barrier.

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Paul E. McKenney
    Cc: Linus Torvalds
    Cc: Mikulas Patocka
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Srikar Dronamraju
    Cc: Ananth N Mavinakayanahalli
    Cc: Anton Arapov
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • This is another step towards better standard conformance. Rather than
    adding a local buffer to store the specified portion of the string (with
    the need to enforce an arbitrary maximum supported width to limit the
    buffer size), do a maximum width conversion and then drop as much of it as
    is necessary to meet the caller's request.

    Also fail on negative field widths.

    Uses the deprecated simple_strto*() functions because kstrtoXX() fail on
    non-zero terminated strings.

    Signed-off-by: Jan Beulich
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Remove the custom implementation of the functionality similar to kbasename().

    Signed-off-by: Andy Shevchenko
    Cc: Jason Baron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Documentation/printk-formats.txt says to use %zd for a ssize_t argument
    and some drivers do. Unfortunately this prints a positive number for
    negative values eg:

    tpm_tis 70030000.tpm_tis: tpm_transmit: tpm_send: error 4294967234

    Add a case to va_args a ssize_t type if the interpretation should be
    signed.

    Tested on PPC32.

    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Gunthorpe
     
  • Brings some 52xx updates. Also manually merged tools/perf/perf.h.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Pull block driver update from Jens Axboe:
    "Now that the core bits are in, here are the driver bits for 3.8. The
    branch contains:

    - A huge pile of drbd bits that were dumped from the 3.7 merge
    window. Following that, it was both made perfectly clear that
    there is going to be no more over-the-wall pulls and how the
    situation on individual pulls can be improved.

    - A few cleanups from Akinobu Mita for drbd and cciss.

    - Queue improvement for loop from Lukas. This grew into adding a
    generic interface for waiting/checking an even with a specific
    lock, allowing this to be pulled out of md and now loop and drbd is
    also using it.

    - A few fixes for xen back/front block driver from Roger Pau Monne.

    - Partition improvements from Stephen Warren, allowing partiion UUID
    to be used as an identifier."

    * 'for-3.8/drivers' of git://git.kernel.dk/linux-block: (609 commits)
    drbd: update Kconfig to match current dependencies
    drbd: Fix drbdsetup wait-connect, wait-sync etc... commands
    drbd: close race between drbd_set_role and drbd_connect
    drbd: respect no-md-barriers setting also when changed online via disk-options
    drbd: Remove obsolete check
    drbd: fixup after wait_even_lock_irq() addition to generic code
    loop: Limit the number of requests in the bio list
    wait: add wait_event_lock_irq() interface
    xen-blkfront: free allocated page
    xen-blkback: move free persistent grants code
    block: partition: msdos: provide UUIDs for partitions
    init: reduce PARTUUID min length to 1 from 36
    block: store partition_meta_info.uuid as a string
    cciss: use check_signature()
    cciss: cleanup bitops usage
    drbd: use copy_highpage
    drbd: if the replication link breaks during handshake, keep retrying
    drbd: check return of kmalloc in receive_uuids
    drbd: Broadcast sync progress no more often than once per second
    drbd: don't try to clear bits once the disk has failed
    ...

    Linus Torvalds
     

17 Dec, 2012

1 commit

  • …ernel/git/konrad/swiotlb

    Pull swiotlb update from Konrad Rzeszutek Wilk:
    "Feature:
    - Use dma addresses instead of the virt_to_phys and vice versa
    functions.

    Remove the multitude of phys_to_virt/virt_to_phys calls and instead
    operate on the physical addresses instead of virtual in many of the
    internal functions. This does provide a speed up in interrupt
    handlers that do DMA operations and use SWIOTLB."

    * tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
    swiotlb: Do not export swiotlb_bounce since there are no external consumers
    swiotlb: Use physical addresses instead of virtual in swiotlb_tbl_sync_single
    swiotlb: Use physical addresses for swiotlb_tbl_unmap_single
    swiotlb: Return physical addresses when calling swiotlb_tbl_map_single
    swiotlb: Make io_tlb_overflow_buffer a physical address
    swiotlb: Make io_tlb_start a physical address instead of a virtual one
    swiotlb: Make io_tlb_end a physical address instead of a virtual one

    Linus Torvalds
     

16 Dec, 2012

1 commit


15 Dec, 2012

1 commit

  • Pull x86 ACPI update from Peter Anvin:
    "This is a patchset which didn't make the last merge window. It adds a
    debugging capability to feed ACPI tables via the initramfs.

    On a grander scope, it formalizes using the initramfs protocol for
    feeding arbitrary blobs which need to be accessed early to the kernel:
    they are fed first in the initramfs blob (lots of bootloaders can
    concatenate this at boot time, others can use a single file) in an
    uncompressed cpio archive using filenames starting with "kernel/".

    The ACPI maintainers requested that this patchset be fed via the x86
    tree rather than the ACPI tree as the footprint in the general x86
    code is much bigger than in the ACPI code proper."

    * 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    X86 ACPI: Use #ifdef not #if for CONFIG_X86 check
    ACPI: Fix build when disabled
    ACPI: Document ACPI table overriding via initrd
    ACPI: Create acpi_table_taint() function to avoid code duplication
    ACPI: Implement physical address table override
    ACPI: Store valid ACPI tables passed via early initrd in reserved memblock areas
    x86, acpi: Introduce x86 arch specific arch_reserve_mem_area() for e820 handling
    lib: Add early cpio decoder

    Linus Torvalds
     

14 Dec, 2012

3 commits

  • Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants in the ASN.1
    general decoder instead of the equivalent numbers.

    Signed-off-by: David Howells
    Signed-off-by: Rusty Russell

    David Howells
     
  • This module used to inject errors in the pSeries specific dynamic
    reconfiguration notifiers. Those are gone however, replaced by
    generic notifiers for changes to the device-tree. So let's update
    the module to deal with these instead and rename it along the way.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Akinobu Mita

    Benjamin Herrenschmidt
     
  • Pull trivial branch from Jiri Kosina:
    "Usual stuff -- comment/printk typo fixes, documentation updates, dead
    code elimination."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    HOWTO: fix double words typo
    x86 mtrr: fix comment typo in mtrr_bp_init
    propagate name change to comments in kernel source
    doc: Update the name of profiling based on sysfs
    treewide: Fix typos in various drivers
    treewide: Fix typos in various Kconfig
    wireless: mwifiex: Fix typo in wireless/mwifiex driver
    messages: i2o: Fix typo in messages/i2o
    scripts/kernel-doc: check that non-void fcts describe their return value
    Kernel-doc: Convention: Use a "Return" section to describe return values
    radeon: Fix typo and copy/paste error in comments
    doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
    various: Fix spelling of "asynchronous" in comments.
    Fix misspellings of "whether" in comments.
    eisa: Fix spelling of "asynchronous".
    various: Fix spelling of "registered" in comments.
    doc: fix quite a few typos within Documentation
    target: iscsi: fix comment typos in target/iscsi drivers
    treewide: fix typo of "suport" in various comments and Kconfig
    treewide: fix typo of "suppport" in various comments
    ...

    Linus Torvalds