19 Dec, 2012

1 commit

  • 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
     

18 Dec, 2012

2 commits

  • 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
     
  • 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
     

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

1 commit


12 Dec, 2012

1 commit

  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the large driver core updates for 3.8-rc1.

    The biggest thing here is the various __dev* marking removals. This
    is going to be a pain for the merge with different subsystem trees, I
    know, but all of the patches included here have been ACKed by their
    various subsystem maintainers, as they wanted them to go through here.

    If this is too much of a pain, I can pull all of them out of this tree
    and just send you one with the other fixes/updates and then, after
    3.8-rc1 is out, do the rest of the removals to ensure we catch them
    all, it's up to you. The merges should all be trivial, and Stephen
    has been doing them all in linux-next for a few weeks now quite
    easily.

    Other than the __dev* marking removals, there's nothing major here,
    some firmware loading updates and other minor things in the driver
    core.

    All of these have (much to Stephen's annoyance), been in linux-next
    for a while.

    Signed-off-by: Greg Kroah-Hartman "

    Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio
    update.

    * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits)
    modpost.c: Stop checking __dev* section mismatches
    init.h: Remove __dev* sections from the kernel
    acpi: remove use of __devinit
    PCI: Remove __dev* markings
    PCI: Always build setup-bus when PCI is enabled
    PCI: Move pci_uevent into pci-driver.c
    PCI: Remove CONFIG_HOTPLUG ifdefs
    unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs
    sh/PCI: Remove CONFIG_HOTPLUG ifdefs
    powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs
    mips/PCI: Remove CONFIG_HOTPLUG ifdefs
    microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs
    dma: remove use of __devinit
    dma: remove use of __devexit_p
    firewire: remove use of __devinitdata
    firewire: remove use of __devinit
    leds: remove use of __devexit
    leds: remove use of __devinit
    leds: remove use of __devexit_p
    mmc: remove use of __devexit
    ...

    Linus Torvalds
     

06 Dec, 2012

1 commit

  • It is $(obj)/oid_registry.o that is dependent on $(obj)/oid_registry_data.c.
    The object file cannot be built until $(obj)/oid_registry_data.c has been
    generated.

    A periodic and hard to reproduce parallel build failure is due to
    this incorrect lib/Makefile dependency. The compile error is completely
    disingenuous.

    GEN lib/oid_registry_data.c
    Compiling 49 OIDs
    CC lib/oid_registry.o
    gcc: error: lib/oid_registry.c: No such file or directory
    gcc: fatal error: no input files
    compilation terminated.
    make[3]: *** [lib/oid_registry.o] Error 4

    Cc: Andrew Morton
    Cc: Akinobu Mita
    Cc: Michel Lespinasse
    Cc: David Howells
    Cc: "David S. Miller"
    Signed-off-by: Tim Gardner
    Signed-off-by: Rusty Russell

    Tim Gardner
     

29 Nov, 2012

1 commit


15 Oct, 2012

1 commit

  • Pull module signing support from Rusty Russell:
    "module signing is the highlight, but it's an all-over David Howells frenzy..."

    Hmm "Magrathea: Glacier signing key". Somebody has been reading too much HHGTTG.

    * 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (37 commits)
    X.509: Fix indefinite length element skip error handling
    X.509: Convert some printk calls to pr_devel
    asymmetric keys: fix printk format warning
    MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking
    MODSIGN: Make mrproper should remove generated files.
    MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs
    MODSIGN: Use the same digest for the autogen key sig as for the module sig
    MODSIGN: Sign modules during the build process
    MODSIGN: Provide a script for generating a key ID from an X.509 cert
    MODSIGN: Implement module signature checking
    MODSIGN: Provide module signing public keys to the kernel
    MODSIGN: Automatically generate module signing keys if missing
    MODSIGN: Provide Kconfig options
    MODSIGN: Provide gitignore and make clean rules for extra files
    MODSIGN: Add FIPS policy
    module: signature checking hook
    X.509: Add a crypto key parser for binary (DER) X.509 certificates
    MPILIB: Provide a function to read raw data into an MPI
    X.509: Add an ASN.1 decoder
    X.509: Add simple ASN.1 grammar compiler
    ...

    Linus Torvalds
     

09 Oct, 2012

3 commits

  • After both prio_tree users have been converted to use red-black trees,
    there is no need to keep around the prio tree library anymore.

    Signed-off-by: Michel Lespinasse
    Cc: Rik van Riel
    Cc: Hillf Danton
    Cc: Peter Zijlstra
    Cc: Catalin Marinas
    Cc: Andrea Arcangeli
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     
  • Patch 1 implements support for interval trees, on top of the augmented
    rbtree API. It also adds synthetic tests to compare the performance of
    interval trees vs prio trees. Short answers is that interval trees are
    slightly faster (~25%) on insert/erase, and much faster (~2.4 - 3x)
    on search. It is debatable how realistic the synthetic test is, and I have
    not made such measurements yet, but my impression is that interval trees
    would still come out faster.

    Patch 2 uses a preprocessor template to make the interval tree generic,
    and uses it as a replacement for the vma prio_tree.

    Patch 3 takes the other prio_tree user, kmemleak, and converts it to use
    a basic rbtree. We don't actually need the augmented rbtree support here
    because the intervals are always non-overlapping.

    Patch 4 removes the now-unused prio tree library.

    Patch 5 proposes an additional optimization to rb_erase_augmented, now
    providing it as an inline function so that the augmented callbacks can be
    inlined in. This provides an additional 5-10% performance improvement
    for the interval tree insert/erase benchmark. There is a maintainance cost
    as it exposes augmented rbtree users to some of the rbtree library internals;
    however I think this cost shouldn't be too high as I expect the augmented
    rbtree will always have much less users than the base rbtree.

    I should probably add a quick summary of why I think it makes sense to
    replace prio trees with augmented rbtree based interval trees now. One of
    the drivers is that we need augmented rbtrees for Rik's vma gap finding
    code, and once you have them, it just makes sense to use them for interval
    trees as well, as this is the simpler and more well known algorithm. prio
    trees, in comparison, seem *too* clever: they impose an additional 'heap'
    constraint on the tree, which they use to guarantee a faster worst-case
    complexity of O(k+log N) for stabbing queries in a well-balanced prio
    tree, vs O(k*log N) for interval trees (where k=number of matches,
    N=number of intervals). Now this sounds great, but in practice prio trees
    don't realize this theorical benefit. First, the additional constraint
    makes them harder to update, so that the kernel implementation has to
    simplify things by balancing them like a radix tree, which is not always
    ideal. Second, the fact that there are both index and heap properties
    makes both tree manipulation and search more complex, which results in a
    higher multiplicative time constant. As it turns out, the simple interval
    tree algorithm ends up running faster than the more clever prio tree.

    This patch:

    Add two test modules:

    - prio_tree_test measures the performance of lib/prio_tree.c, both for
    insertion/removal and for stabbing searches

    - interval_tree_test measures the performance of a library of equivalent
    functionality, built using the augmented rbtree support.

    In order to support the second test module, lib/interval_tree.c is
    introduced. It is kept separate from the interval_tree_test main file
    for two reasons: first we don't want to provide an unfair advantage
    over prio_tree_test by having everything in a single compilation unit,
    and second there is the possibility that the interval tree functionality
    could get some non-test users in kernel over time.

    Signed-off-by: Michel Lespinasse
    Cc: Rik van Riel
    Cc: Hillf Danton
    Cc: Peter Zijlstra
    Cc: Catalin Marinas
    Cc: Andrea Arcangeli
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     
  • This small module helps measure the performance of rbtree insert and
    erase.

    Additionally, we run a few correctness tests to check that the rbtrees
    have all desired properties:

    - contains the right number of nodes in the order desired,
    - never two consecutive red nodes on any path,
    - all paths to leaf nodes have the same number of black nodes,
    - root node is black

    [akpm@linux-foundation.org: fix printk warning: sparc64 cycles_t is unsigned long]
    Signed-off-by: Michel Lespinasse
    Cc: Andrea Arcangeli
    Acked-by: David Woodhouse
    Cc: Rik van Riel
    Cc: Peter Zijlstra
    Cc: Daniel Santos
    Cc: Jens Axboe
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     

08 Oct, 2012

2 commits

  • Add an ASN.1 BER/DER/CER decoder. This uses the bytecode from the ASN.1
    compiler in the previous patch to inform it as to what to expect to find in the
    encoded byte stream. The output from the compiler also tells it what functions
    to call on what tags, thus allowing the caller to retrieve information.

    The decoder is called as follows:

    int asn1_decoder(const struct asn1_decoder *decoder,
    void *context,
    const unsigned char *data,
    size_t datalen);

    The decoder argument points to the bytecode from the ASN.1 compiler. context
    is the caller's context and is passed to the action functions. data and
    datalen define the byte stream to be decoded.

    Note that the decoder is currently limited to datalen being less than 64K.
    This reduces the amount of stack space used by the decoder because ASN.1 is a
    nested construct. Similarly, the decoder is limited to a maximum of 10 levels
    of constructed data outside of a leaf node also in an effort to keep stack
    usage down.

    These restrictions can be raised if necessary.

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

    David Howells
     
  • Implement a simple static OID registry that allows the mapping of an encoded
    OID to an enum value for ease of use.

    The OID registry index enum appears in the:

    linux/oid_registry.h

    header file. A script generates the registry from lines in the header file
    that look like:

    OID_foo,/*1.2.3.4*/

    The actual OID is taken to be represented by the numbers with interpolated
    dots in the comment.

    All other lines in the header are ignored.

    The registry is queries by calling:

    OID look_up_oid(const void *data, size_t datasize);

    This returns a number from the registry enum representing the OID if found or
    OID__NR if not.

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

    David Howells
     

01 Oct, 2012

1 commit

  • Add a simple cpio decoder without library dependencies for the purpose
    of extracting components from the initramfs blob for early kernel
    uses. Intended consumers so far are microcode and ACPI override.

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1349043837-22659-2-git-send-email-trenn@suse.de
    Cc: Len Brown
    Cc: Fenghua Yu
    Signed-off-by: Thomas Renninger
    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     

31 Jul, 2012

7 commits

  • Pull writeback updates from Wu Fengguang:
    "Use time based periods to age the writeback proportions, which can
    adapt equally well to fast/slow devices."

    Fix up trivial conflict in comment in fs/sync.c

    * tag 'writeback-proportions' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: Fix some comment errors
    block: Convert BDI proportion calculations to flexible proportions
    lib: Fix possible deadlock in flexible proportion code
    lib: Proportions with flexible period

    Linus Torvalds
     
  • Merge Andrew's first set of patches:
    "Non-MM patches:

    - lots of misc bits

    - tree-wide have_clk() cleanups

    - quite a lot of printk tweaks. I draw your attention to "printk:
    convert the format for KERN_ to a 2 byte pattern" which
    looks a bit scary. But afaict it's solid.

    - backlight updates

    - lib/ feature work (notably the addition and use of memweight())

    - checkpatch updates

    - rtc updates

    - nilfs updates

    - fatfs updates (partial, still waiting for acks)

    - kdump, proc, fork, IPC, sysctl, taskstats, pps, etc

    - new fault-injection feature work"

    * Merge emailed patches from Andrew Morton : (128 commits)
    drivers/misc/lkdtm.c: fix missing allocation failure check
    lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
    fault-injection: add tool to run command with failslab or fail_page_alloc
    fault-injection: add selftests for cpu and memory hotplug
    powerpc: pSeries reconfig notifier error injection module
    memory: memory notifier error injection module
    PM: PM notifier error injection module
    cpu: rewrite cpu-notifier-error-inject module
    fault-injection: notifier error injection
    c/r: fcntl: add F_GETOWNER_UIDS option
    resource: make sure requested range is included in the root range
    include/linux/aio.h: cpp->C conversions
    fs: cachefiles: add support for large files in filesystem caching
    pps: return PTR_ERR on error in device_create
    taskstats: check nla_reserve() return
    sysctl: suppress kmemleak messages
    ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION
    ipc: compat: use signed size_t types for msgsnd and msgrcv
    ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC
    ipc: add COMPAT_SHMLBA support
    ...

    Linus Torvalds
     
  • This provides the ability to inject artifical errors to pSeries reconfig
    notifier chain callbacks. It is controlled through debugfs interface
    under /sys/kernel/debug/notifier-error-inject/pSeries-reconfig

    If the notifier call chain should be failed with some events
    notified, write the error code to "actions//error".

    Signed-off-by: Akinobu Mita
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This provides the ability to inject artifical errors to memory hotplug
    notifier chain callbacks. It is controlled through debugfs interface
    under /sys/kernel/debug/notifier-error-inject/memory

    If the notifier call chain should be failed with some events notified,
    write the error code to "actions//error".

    Example: Inject memory hotplug offline error (-12 == -ENOMEM)

    # cd /sys/kernel/debug/notifier-error-inject/memory
    # echo -12 > actions/MEM_GOING_OFFLINE/error
    # echo offline > /sys/devices/system/memory/memoryXXX/state
    bash: echo: write error: Cannot allocate memory

    Signed-off-by: Akinobu Mita
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This provides the ability to inject artifical errors to PM notifier chain
    callbacks. It is controlled through debugfs interface under
    /sys/kernel/debug/notifier-error-inject/pm

    Each of the files in "error" directory represents an event which can be
    failed and contains the error code. If the notifier call chain should be
    failed with some events notified, write the error code to the files.

    If the notifier call chain should be failed with some events notified,
    write the error code to "actions//error".

    Example: Inject PM suspend error (-12 = -ENOMEM)

    # cd /sys/kernel/debug/notifier-error-inject/pm
    # echo -12 > actions/PM_SUSPEND_PREPARE/error
    # echo mem > /sys/power/state
    bash: echo: write error: Cannot allocate memory

    Signed-off-by: Akinobu Mita
    Acked-by: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Cc: Greg KH
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This patchset provides kernel modules that can be used to test the error
    handling of notifier call chain failures by injecting artifical errors to
    the following notifier chain callbacks.

    * CPU notifier
    * PM notifier
    * memory hotplug notifier
    * powerpc pSeries reconfig notifier

    Example: Inject CPU offline error (-1 == -EPERM)

    # cd /sys/kernel/debug/notifier-error-inject/cpu
    # echo -1 > actions/CPU_DOWN_PREPARE/error
    # echo 0 > /sys/devices/system/cpu/cpu1/online
    bash: echo: write error: Operation not permitted

    The patchset also adds cpu and memory hotplug tests to
    tools/testing/selftests These tests first do simple online and offline
    test and then do fault injection tests if notifier error injection
    module is available.

    This patch:

    The notifier error injection provides the ability to inject artifical
    errors to specified notifier chain callbacks. It is useful to test the
    error handling of notifier call chain failures.

    This adds common basic functions to define which type of events can be
    fail and to initialize the debugfs interface to control what error code
    should be returned and which event should be failed.

    Signed-off-by: Akinobu Mita
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • memweight() is the function that counts the total number of bits set in
    memory area. Unlike bitmap_weight(), memweight() takes pointer and size
    in bytes to specify a memory area which does not need to be aligned to
    long-word boundary.

    [akpm@linux-foundation.org: rename `w' to `ret']
    Signed-off-by: Akinobu Mita
    Cc: Anders Larsen
    Cc: Alasdair Kergon
    Cc: Laurent Pinchart
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Jan Kara
    Cc: Andreas Dilger
    Cc: "Theodore Ts'o"
    Cc: Matthew Wilcox
    Cc: Mauro Carvalho Chehab
    Cc: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

23 Jul, 2012

1 commit

  • libfdt is part of the device tree support in scripts/dtc/libfdt. For
    some platforms that use the Device Tree, we want to be able to edit
    the flattened device tree form.

    We don't want to burden kernel builds that do not require it, so we
    gate compilation of libfdt files with CONFIG_LIBFDT. So if it is
    needed, you need to do this in your Kconfig:

    select LIBFDT

    And in the Makefile of the code using libfdt something like:

    ccflags-y := -I$(src)/../../../scripts/dtc/libfdt

    Signed-off-by: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: devicetree-discuss@lists.ozlabs.org
    Cc: Grant Likely
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Rob Herring
    Signed-off-by: Ralf Baechle

    David Daney
     

09 Jun, 2012

1 commit

  • Implement code computing proportions of events of different type (like code in
    lib/proportions.c) but allowing periods to have different lengths. This allows
    us to have aging periods of fixed wallclock time which gives better proportion
    estimates given the hugely varying throughput of different devices - previous
    measuring of aging period by number of events has the problem that a reasonable
    period length for a system with low-end USB stick is not a reasonable period
    length for a system with high-end storage array resulting either in too slow
    proportion updates or too fluctuating proportion updates.

    Acked-by: Peter Zijlstra
    Signed-off-by: Jan Kara
    Signed-off-by: Fengguang Wu

    Jan Kara
     

27 May, 2012

3 commits

  • This makes actually live up to its promise of
    allowing architectures to help tune the string functions that do their
    work a word at a time.

    David had already taken the x86 strncpy_from_user() function, modified
    it to work on sparc, and then done the extra work to make it generically
    useful. This then expands on that work by making x86 use that generic
    version, completing the circle.

    But more importantly, it fixes up the word-at-a-time interfaces so that
    it's now easy to also support things like strnlen_user(), and pretty
    much most random string functions.

    David reports that it all works fine on sparc, and Jonas Bonn reported
    that an earlier version of this worked on OpenRISC too. It's pretty
    easy for architectures to add support for this and just replace their
    private versions with the generic code.

    * generic-string-functions:
    sparc: use the new generic strnlen_user() function
    x86: use the new generic strnlen_user() function
    lib: add generic strnlen_user() function
    word-at-a-time: make the interfaces truly generic
    x86: use generic strncpy_from_user routine

    Linus Torvalds
     
  • Pull arm-soc stmp-dev library code from Olof Johansson:
    "A number of devices are using a common register layout, this adds
    support code for it in lib/stmp_device.c so we do not need to
    duplicate it in each driver."

    Fix up trivial conflicts in drivers/i2c/busses/i2c-mxs.c and
    lib/Makefile

    * tag 'stmp-dev' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    i2c: mxs: use global reset function
    lib: add support for stmp-style devices

    Linus Torvalds
     
  • This adds a new generic optimized strnlen_user() function that uses the
    infrastructure to portably do efficient string
    handling.

    In many ways, strnlen is much simpler than strncpy, and in particular we
    can always pre-align the words we load from memory. That means that all
    the worries about alignment etc are a non-issue, so this one can easily
    be used on any architecture. You obviously do have to do the
    appropriate word-at-a-time.h macros.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 May, 2012

2 commits

  • Pull sparc changes from David S. Miller:
    "This has the generic strncpy_from_user() implementation architectures
    can now use, which we've been developing on linux-arch over the past
    few days.

    For good measure I ran both a 32-bit and a 64-bit glibc testsuite run,
    and the latter of which pointed out an adjustment I needed to make to
    sparc's user_addr_max() definition. Linus, you were right, STACK_TOP
    was not the right thing to use, even on sparc itself :-)

    From Sam Ravnborg, we have a conversion of sparc32 over to the common
    alloc_thread_info_node(), since the aspect which originally blocked
    our doing so (sun4c) has been removed."

    Fix up trivial arch/sparc/Kconfig and lib/Makefile conflicts.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc: Fix user_addr_max() definition.
    lib: Sparc's strncpy_from_user is generic enough, move under lib/
    kernel: Move REPEAT_BYTE definition into linux/kernel.h
    sparc: Increase portability of strncpy_from_user() implementation.
    sparc: Optimize strncpy_from_user() zero byte search.
    sparc: Add full proper error handling to strncpy_from_user().
    sparc32: use the common implementation of alloc_thread_info_node()

    Linus Torvalds
     
  • To use this, an architecture simply needs to:

    1) Provide a user_addr_max() implementation via asm/uaccess.h

    2) Add "select GENERIC_STRNCPY_FROM_USER" to their arch Kcnfig

    3) Remove the existing strncpy_from_user() implementation and symbol
    exports their architecture had.

    Signed-off-by: David S. Miller
    Acked-by: David Howells

    David S. Miller
     

02 May, 2012

1 commit

  • add LPDDR2 data from the JEDEC spec JESD209-2. The data
    includes:

    1. Addressing information for LPDDR2 memories of different
    densities and types(S2/S4)
    2. AC timing data.

    This data will useful for memory controller device drivers.
    Right now this is used by the TI EMIF SDRAM controller
    driver.

    Signed-off-by: Aneesh V
    Reviewed-by: Santosh Shilimkar
    Reviewed-by: Benoit Cousson
    [santosh.shilimkar@ti.com: Moved to drivers/memory from drivers/misc]
    Signed-off-by: Santosh Shilimkar
    Tested-by: Lokesh Vutla
    Signed-off-by: Greg Kroah-Hartman

    Aneesh V
     

21 Apr, 2012

1 commit

  • MX23/28 use IP cores which follow a register layout I have first seen on
    STMP3xxx SoCs. In this layout, every register actually has four u32:

    1.) to store a value directly
    2.) a SET register where every 1-bit sets the corresponding bit,
    others are unaffected
    3.) same with a CLR register
    4.) same with a TOG (toggle) register

    Also, the 2 MSBs in register 0 are always the same and can be used to reset
    the IP core.

    All this is strictly speaking not mach-specific (but IP core specific) and,
    thus, doesn't need to be in mach-mxs/include. At least mx6 also uses IP cores
    following this stmp-style. So:

    Introduce a stmp-style device, put the code and defines for that in a public
    place (lib/), and let drivers for stmp-style devices select that code.
    To avoid regressions and ease reviewing, the actual code is simply copied from
    mach-mxs. It definately wants updates, but those need a seperate patch series.

    Voila, mach dependency gone, reusable code introduced. Note that I didn't
    remove the duplicated code from mach-mxs yet, first the drivers have to be
    converted.

    Signed-off-by: Wolfram Sang
    Acked-by: Shawn Guo
    Acked-by: Dong Aisheng

    Wolfram Sang
     

02 Feb, 2012

1 commit

  • Both sparc 32-bit's software divide assembler and MPILIB provide
    clz_tab[] with identical contents.

    Break it out into a seperate object file and select it when
    SPARC32 or MPILIB is set.

    Reported-by: Al Viro
    Signed-off-by: David S. Miller
    Signed-off-by: James Morris

    David Miller
     

18 Jan, 2012

1 commit


11 Jan, 2012

2 commits

  • * 'for-linus' of git://selinuxproject.org/~jmorris/linux-security: (32 commits)
    ima: fix invalid memory reference
    ima: free duplicate measurement memory
    security: update security_file_mmap() docs
    selinux: Casting (void *) value returned by kmalloc is useless
    apparmor: fix module parameter handling
    Security: tomoyo: add .gitignore file
    tomoyo: add missing rcu_dereference()
    apparmor: add missing rcu_dereference()
    evm: prevent racing during tfm allocation
    evm: key must be set once during initialization
    mpi/mpi-mpow: NULL dereference on allocation failure
    digsig: build dependency fix
    KEYS: Give key types their own lockdep class for key->sem
    TPM: fix transmit_cmd error logic
    TPM: NSC and TIS drivers X86 dependency fix
    TPM: Export wait_for_stat for other vendor specific drivers
    TPM: Use vendor specific function for status probe
    tpm_tis: add delay after aborting command
    tpm_tis: Check return code from getting timeouts/durations
    tpm: Introduce function to poll for result of self test
    ...

    Fix up trivial conflict in lib/Makefile due to addition of CONFIG_MPI
    and SIGSIG next to CONFIG_DQL addition.

    Linus Torvalds
     
  • lib: use generic pci_iomap on all architectures

    Many architectures don't want to pull in iomap.c,
    so they ended up duplicating pci_iomap from that file.
    That function isn't trivial, and we are going to modify it
    https://lkml.org/lkml/2011/11/14/183
    so the duplication hurts.

    This reduces the scope of the problem significantly,
    by moving pci_iomap to a separate file and
    referencing that from all architectures.

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    alpha: drop pci_iomap/pci_iounmap from pci-noop.c
    mn10300: switch to GENERIC_PCI_IOMAP
    mn10300: add missing __iomap markers
    frv: switch to GENERIC_PCI_IOMAP
    tile: switch to GENERIC_PCI_IOMAP
    tile: don't panic on iomap
    sparc: switch to GENERIC_PCI_IOMAP
    sh: switch to GENERIC_PCI_IOMAP
    powerpc: switch to GENERIC_PCI_IOMAP
    parisc: switch to GENERIC_PCI_IOMAP
    mips: switch to GENERIC_PCI_IOMAP
    microblaze: switch to GENERIC_PCI_IOMAP
    arm: switch to GENERIC_PCI_IOMAP
    alpha: switch to GENERIC_PCI_IOMAP
    lib: add GENERIC_PCI_IOMAP
    lib: move GENERIC_IOMAP to lib/Kconfig

    Fix up trivial conflicts due to changes nearby in arch/{m68k,score}/Kconfig

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

14 Dec, 2011

1 commit

  • These are tiny functions, there's no point in having them out-of-line.

    Cc: Alexey Dobriyan
    Cc: Eric Dumazet
    Cc: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-8eccvi2ur2fzgi00xdjlbf5z@git.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Peter Zijlstra
     

30 Nov, 2011

1 commit

  • Implementation of dynamic queue limits (dql). This is a libary which
    allows a queue limit to be dynamically managed. The goal of dql is
    to set the queue limit, number of objects to the queue, to be minimized
    without allowing the queue to be starved.

    dql would be used with a queue which has these properties:

    1) Objects are queued up to some limit which can be expressed as a
    count of objects.
    2) Periodically a completion process executes which retires consumed
    objects.
    3) Starvation occurs when limit has been reached, all queued data has
    actually been consumed but completion processing has not yet run,
    so queuing new data is blocked.
    4) Minimizing the amount of queued data is desirable.

    A canonical example of such a queue would be a NIC HW transmit queue.

    The queue limit is dynamic, it will increase or decrease over time
    depending on the workload. The queue limit is recalculated each time
    completion processing is done. Increases occur when the queue is
    starved and can exponentially increase over successive intervals.
    Decreases occur when more data is being maintained in the queue than
    needed to prevent starvation. The number of extra objects, or "slack",
    is measured over successive intervals, and to avoid hysteresis the
    limit is only reduced by the miminum slack seen over a configurable
    time period.

    dql API provides routines to manage the queue:
    - dql_init is called to intialize the dql structure
    - dql_reset is called to reset dynamic values
    - dql_queued called when objects are being enqueued
    - dql_avail returns availability in the queue
    - dql_completed is called when objects have be consumed in the queue

    Configuration consists of:
    - max_limit, maximum limit
    - min_limit, minimum limit
    - slack_hold_time, time to measure instances of slack before reducing
    queue limit

    Signed-off-by: Tom Herbert
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tom Herbert
     

29 Nov, 2011

1 commit


09 Nov, 2011

1 commit

  • This patch implements RSA digital signature verification using GnuPG library.

    The format of the signature and the public key is defined by their respective
    headers. The signature header contains version information, algorithm,
    and keyid, which was used to generate the signature.
    The key header contains version and algorythim type.
    The payload of the signature and the key are multi-precision integers.

    The signing and key management utilities evm-utils provide functionality
    to generate signatures and load keys into the kernel keyring.
    When the key is added to the kernel keyring, the keyid defines the name
    of the key.

    Signed-off-by: Dmitry Kasatkin
    Acked-by: Mimi Zohar

    Dmitry Kasatkin