20 Jan, 2015

2 commits

  • Nothing needs the module pointer any more, and the next patch will
    call it from RCU, where the module itself might no longer exist.
    Removing the arg is the safest approach.

    This just codifies the use of the module_alloc/module_free pattern
    which ftrace and bpf use.

    Signed-off-by: Rusty Russell
    Acked-by: Alexei Starovoitov
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: Ralf Baechle
    Cc: Ley Foon Tan
    Cc: Benjamin Herrenschmidt
    Cc: Chris Metcalf
    Cc: Steven Rostedt
    Cc: x86@kernel.org
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: Masami Hiramatsu
    Cc: linux-cris-kernel@axis.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: sparclinux@vger.kernel.org
    Cc: netdev@vger.kernel.org

    Rusty Russell
     
  • Archs have been abusing module_free() to clean up their arch-specific
    allocations. Since module_free() is also (ab)used by BPF and trace code,
    let's keep it to simple allocations, and provide a hook called before
    that.

    This means that avr32, ia64, parisc and s390 no longer need to implement
    their own module_free() at all. avr32 doesn't need module_finalize()
    either.

    Signed-off-by: Rusty Russell
    Cc: Chris Metcalf
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-s390@vger.kernel.org

    Rusty Russell
     

17 Dec, 2014

1 commit

  • Pull arch/tile updates from Chris Metcalf:
    "Note that one of the changes converts my old cmetcalf@tilera.com email
    in MAINTAINERS to the cmetcalf@ezchip.com email that you see on this
    email"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: update MAINTAINERS email to EZchip
    tile: avoid undefined behavior with regs[TREG_TP] etc
    arch: tile: kernel: kgdb.c: Use memcpy() instead of pointer copy one by one
    tile: Use the more common pr_warn instead of pr_warning
    arch: tile: gxio: Export symbols for module using in 'mpipe.c'
    arch: tile: kernel: signal.c: Use __copy_from/to_user() instead of __get/put_user()

    Linus Torvalds
     

12 Dec, 2014

1 commit

  • Pull networking updates from David Miller:

    1) New offloading infrastructure and example 'rocker' driver for
    offloading of switching and routing to hardware.

    This work was done by a large group of dedicated individuals, not
    limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
    Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu

    2) Start making the networking operate on IOV iterators instead of
    modifying iov objects in-situ during transfers. Thanks to Al Viro
    and Herbert Xu.

    3) A set of new netlink interfaces for the TIPC stack, from Richard
    Alpe.

    4) Remove unnecessary looping during ipv6 routing lookups, from Martin
    KaFai Lau.

    5) Add PAUSE frame generation support to gianfar driver, from Matei
    Pavaluca.

    6) Allow for larger reordering levels in TCP, which are easily
    achievable in the real world right now, from Eric Dumazet.

    7) Add a variable of napi_schedule that doesn't need to disable cpu
    interrupts, from Eric Dumazet.

    8) Use a doubly linked list to optimize neigh_parms_release(), from
    Nicolas Dichtel.

    9) Various enhancements to the kernel BPF verifier, and allow eBPF
    programs to actually be attached to sockets. From Alexei
    Starovoitov.

    10) Support TSO/LSO in sunvnet driver, from David L Stevens.

    11) Allow controlling ECN usage via routing metrics, from Florian
    Westphal.

    12) Remote checksum offload, from Tom Herbert.

    13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
    driver, from Thomas Lendacky.

    14) Add MPLS support to openvswitch, from Simon Horman.

    15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
    Klassert.

    16) Do gro flushes on a per-device basis using a timer, from Eric
    Dumazet. This tries to resolve the conflicting goals between the
    desired handling of bulk vs. RPC-like traffic.

    17) Allow userspace to ask for the CPU upon what a packet was
    received/steered, via SO_INCOMING_CPU. From Eric Dumazet.

    18) Limit GSO packets to half the current congestion window, from Eric
    Dumazet.

    19) Add a generic helper so that all drivers set their RSS keys in a
    consistent way, from Eric Dumazet.

    20) Add xmit_more support to enic driver, from Govindarajulu
    Varadarajan.

    21) Add VLAN packet scheduler action, from Jiri Pirko.

    22) Support configurable RSS hash functions via ethtool, from Eyal
    Perry.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
    Fix race condition between vxlan_sock_add and vxlan_sock_release
    net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
    net/mlx4: Add support for A0 steering
    net/mlx4: Refactor QUERY_PORT
    net/mlx4_core: Add explicit error message when rule doesn't meet configuration
    net/mlx4: Add A0 hybrid steering
    net/mlx4: Add mlx4_bitmap zone allocator
    net/mlx4: Add a check if there are too many reserved QPs
    net/mlx4: Change QP allocation scheme
    net/mlx4_core: Use tasklet for user-space CQ completion events
    net/mlx4_core: Mask out host side virtualization features for guests
    net/mlx4_en: Set csum level for encapsulated packets
    be2net: Export tunnel offloads only when a VxLAN tunnel is created
    gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
    cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
    net: fec: only enable mdio interrupt before phy device link up
    net: fec: clear all interrupt events to support i.MX6SX
    net: fec: reset fep link status in suspend function
    net: sock: fix access via invalid file descriptor
    net: introduce helper macro for_each_cmsghdr
    ...

    Linus Torvalds
     

11 Dec, 2014

5 commits

  • Use the more common pr_warn.

    Coalesce formats, realign arguments.

    Signed-off-by: Joe Perches
    Acked-by: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Coalesce the formats and align arguments.

    Signed-off-by: Joe Perches
    Acked-by: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Eliminate the unlikely possibility of message interleaving for
    early_printk/early_vprintk use.

    early_vprintk can be done via the %pV extension so remove this
    unnecessary function and change early_printk to have the equivalent
    vprintk code.

    All uses of early_printk already end with a newline so also remove the
    unnecessary newline from the early_printk function.

    Signed-off-by: Joe Perches
    Acked-by: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • As there are now no remaining users of arch_fast_hash(), lets kill
    it entirely.

    This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
    optimized hash library") and follow-up work, that is f.e., commit
    237217546d44 ("lib: hash: follow-up fixups for arch hash"),
    commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
    asm-generic/hash.h") and last but not least commit 6a02652df511
    ("perf tools: Fix include for non x86 architectures").

    Cc: Francesco Fusco
    Cc: Thomas Graf
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Pull irq domain updates from Thomas Gleixner:
    "The real interesting irq updates:

    - Support for hierarchical irq domains:

    For complex interrupt routing scenarios where more than one
    interrupt related chip is involved we had no proper representation
    in the generic interrupt infrastructure so far. That made people
    implement rather ugly constructs in their nested irq chip
    implementations. The main offenders are x86 and arm/gic.

    To distangle that mess we have now hierarchical irqdomains which
    seperate the various interrupt chips and connect them via the
    hierarchical domains. That keeps the domain specific details
    internal to the particular hierarchy level and removes the
    criss/cross referencing of chip internals. The resulting hierarchy
    for a complex x86 system will look like this:

    vector mapped: 74
    msi-0 mapped: 2
    dmar-ir-1 mapped: 69
    ioapic-1 mapped: 4
    ioapic-0 mapped: 20
    pci-msi-2 mapped: 45
    dmar-ir-0 mapped: 3
    ioapic-2 mapped: 1
    pci-msi-1 mapped: 2
    htirq mapped: 0

    Neither ioapic nor pci-msi know about the dmar interrupt remapping
    between themself and the vector domain. If interrupt remapping is
    disabled ioapic and pci-msi become direct childs of the vector
    domain.

    In hindsight we should have done that years ago, but in hindsight
    we always know better :)

    - Support for generic MSI interrupt domain handling

    We have more and more non PCI related MSI interrupts, so providing
    a generic infrastructure for this is better than having all
    affected architectures implementing their own private hacks.

    - Support for PCI-MSI interrupt domain handling, based on the generic
    MSI support.

    This part carries the pci/msi branch from Bjorn Helgaas pci tree to
    avoid a massive conflict. The PCI/MSI parts are acked by Bjorn.

    I have two more branches on top of this. The full conversion of x86
    to hierarchical domains and a partial conversion of arm/gic"

    * 'irq-irqdomain-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
    genirq: Move irq_chip_write_msi_msg() helper to core
    PCI/MSI: Allow an msi_controller to be associated to an irq domain
    PCI/MSI: Provide mechanism to alloc/free MSI/MSIX interrupt from irqdomain
    PCI/MSI: Enhance core to support hierarchy irqdomain
    PCI/MSI: Move cached entry functions to irq core
    genirq: Provide default callbacks for msi_domain_ops
    genirq: Introduce msi_domain_alloc/free_irqs()
    asm-generic: Add msi.h
    genirq: Add generic msi irq domain support
    genirq: Introduce callback irq_chip.irq_write_msi_msg
    genirq: Work around __irq_set_handler vs stacked domains ordering issues
    irqdomain: Introduce helper function irq_domain_add_hierarchy()
    irqdomain: Implement a method to automatically call parent domains alloc/free
    genirq: Introduce helper irq_domain_set_info() to reduce duplicated code
    genirq: Split out flow handler typedefs into seperate header file
    genirq: Add IRQ_SET_MASK_OK_DONE to support stacked irqchip
    genirq: Introduce irq_chip.irq_compose_msi_msg() to support stacked irqchip
    genirq: Add more helper functions to support stacked irq_chip
    genirq: Introduce helper functions to support stacked irq_chip
    irqdomain: Do irq_find_mapping and set_type for hierarchy irqdomain in case OF
    ...

    Linus Torvalds
     

30 Nov, 2014

1 commit


23 Nov, 2014

2 commits

  • The PCI/MSI irq chip callbacks mask/unmask_msi_irq have been renamed
    to pci_msi_mask/unmask_irq to mark them PCI specific. Rename all usage
    sites. The conversion helper functions are kept around to avoid
    conflicts in next and will be removed after merging into mainline.

    Coccinelle assisted conversion. No functional change.

    Signed-off-by: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: x86@kernel.org
    Cc: Jiang Liu
    Cc: Jason Cooper
    Cc: Murali Karicheri
    Cc: Thierry Reding
    Cc: Mohit Kumar
    Cc: Simon Horman
    Cc: Michal Simek
    Cc: Yijing Wang

    Thomas Gleixner
     
  • Rename write_msi_msg() to pci_write_msi_msg() to mark it as PCI
    specific.

    Signed-off-by: Jiang Liu
    Cc: Bjorn Helgaas
    Cc: Grant Likely
    Cc: Marc Zyngier
    Cc: Yingjoe Chen
    Cc: Yijing Wang
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

13 Nov, 2014

2 commits

  • Recent compilers warn about accesses to arrays past the end,
    which is supported for pt_regs and sigcontext with the
    intended alias past the end of regs[] to sp, tp, and lr
    using TREG_SP, TREG_TP, and TREG_LR.

    Make the intended usage explict by providing an anonymous
    union of regs[56] on the one hand, and a short __regs[53]
    on the other followed by the sp, tp, and lr fields, so the
    aliasing is done explicitly and is visible to the compiler.

    Reviewed-by: Jeff Epler
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Not only memcpy() is faster than pointer copy, but also let code more
    clearer and simple, which can avoid compiling warning (the original
    implementation copy registers by exceeding member array border).

    The related warning (with allmodconfig under tile):

    CC arch/tile/kernel/kgdb.o
    arch/tile/kernel/kgdb.c: In function 'sleeping_thread_to_gdb_regs':
    arch/tile/kernel/kgdb.c:140:31: warning: iteration 53u invokes undefined behavior [-Waggressive-loop-optimizations]
    *(ptr++) = thread_regs->regs[reg];
    ^
    arch/tile/kernel/kgdb.c:139:2: note: containing loop
    for (reg = 0; reg
    Signed-off-by: Chris Metcalf

    Chen Gang
     

12 Nov, 2014

2 commits

  • And other message logging neatening.

    Other miscellanea:

    o coalesce formats
    o realign arguments
    o standardize a couple of macros
    o use __func__ instead of embedding the function name

    Signed-off-by: Joe Perches
    Signed-off-by: Chris Metcalf

    Joe Perches
     
  • 'gxio_mpipe_adjust_timestamp', 'gxio_mpipe_link_instance',
    'gxio_mpipe_get_timestamp', and 'gxio_mpipe_set_timestamp' may be use by
    other tile modules, so export them.

    The related error (with allmodconfig under tile):

    MODPOST 4002 modules
    ERROR: "gxio_mpipe_link_instance" [drivers/net/ethernet/tile/tile_net.ko] undefined!
    ERROR: "gxio_mpipe_get_timestamp" [drivers/net/ethernet/tile/tile_net.ko] undefined!
    ERROR: "gxio_mpipe_set_timestamp" [drivers/net/ethernet/tile/tile_net.ko] undefined!
    ERROR: "gxio_mpipe_adjust_timestamp" [drivers/net/ethernet/tile/tile_net.ko] undefined!

    Signed-off-by: Chen Gang
    Signed-off-by: Chris Metcalf

    Chen Gang
     

04 Nov, 2014

1 commit

  • setup/restore_sigcontext() want to copy all related registers between
    user and kernel. So use block copy instead of each registers copy. Then
    can let code simple and clearer (which can avoid compiler's warning):

    The related warning (with allmodconfig under tile):

    CC arch/tile/kernel/signal.o
    In file included from include/linux/poll.h:11:0,
    from include/linux/ring_buffer.h:7,
    from include/linux/ftrace_event.h:5,
    from include/trace/syscall.h:6,
    from include/linux/syscalls.h:81,
    from arch/tile/kernel/signal.c:30:
    arch/tile/kernel/signal.c: In function 'setup_sigcontext':
    arch/tile/kernel/signal.c:116:31: warning: iteration 53u invokes undefined behavior [-Waggressive-loop-optimizations]
    err |= __put_user(regs->regs[i], &sc->gregs[i]);
    ^
    ./arch/tile/include/asm/uaccess.h:236:26: note: in definition of macro '__put_user_asm'
    : "r" (ptr), "r" (x), "i" (-EFAULT))
    ^
    ./arch/tile/include/asm/uaccess.h:297:10: note: in expansion of macro '__put_user_8'
    case 8: __put_user_8(x, ptr, __ret); break; \
    ^
    arch/tile/kernel/signal.c:116:10: note: in expansion of macro '__put_user'
    err |= __put_user(regs->regs[i], &sc->gregs[i]);
    ^
    arch/tile/kernel/signal.c:115:2: note: containing loop
    for (i = 0; i < sizeof(struct pt_regs)/sizeof(long); ++i)
    ^

    Signed-off-by: Chen Gang
    Signed-off-by: Chris Metcalf

    Chen Gang
     

21 Oct, 2014

1 commit

  • write{b,w,l,q}_relaxed are implemented by some architectures in order to
    permit memory-mapped I/O accesses with weaker barrier semantics than the
    non-relaxed variants.

    This patch adds dummy macros for the write accessors to tile, in the
    same vein as the dummy definitions for the relaxed read accessors.

    Acked-by: Chris Metcalf
    Signed-off-by: Will Deacon

    Will Deacon
     

15 Oct, 2014

1 commit

  • Pull percpu consistent-ops changes from Tejun Heo:
    "Way back, before the current percpu allocator was implemented, static
    and dynamic percpu memory areas were allocated and handled separately
    and had their own accessors. The distinction has been gone for many
    years now; however, the now duplicate two sets of accessors remained
    with the pointer based ones - this_cpu_*() - evolving various other
    operations over time. During the process, we also accumulated other
    inconsistent operations.

    This pull request contains Christoph's patches to clean up the
    duplicate accessor situation. __get_cpu_var() uses are replaced with
    with this_cpu_ptr() and __this_cpu_ptr() with raw_cpu_ptr().

    Unfortunately, the former sometimes is tricky thanks to C being a bit
    messy with the distinction between lvalues and pointers, which led to
    a rather ugly solution for cpumask_var_t involving the introduction of
    this_cpu_cpumask_var_ptr().

    This converts most of the uses but not all. Christoph will follow up
    with the remaining conversions in this merge window and hopefully
    remove the obsolete accessors"

    * 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (38 commits)
    irqchip: Properly fetch the per cpu offset
    percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t -fix
    ia64: sn_nodepda cannot be assigned to after this_cpu conversion. Use __this_cpu_write.
    percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t
    Revert "powerpc: Replace __get_cpu_var uses"
    percpu: Remove __this_cpu_ptr
    clocksource: Replace __this_cpu_ptr with raw_cpu_ptr
    sparc: Replace __get_cpu_var uses
    avr32: Replace __get_cpu_var with __this_cpu_write
    blackfin: Replace __get_cpu_var uses
    tile: Use this_cpu_ptr() for hardware counters
    tile: Replace __get_cpu_var uses
    powerpc: Replace __get_cpu_var uses
    alpha: Replace __get_cpu_var
    ia64: Replace __get_cpu_var uses
    s390: cio driver &__get_cpu_var replacements
    s390: Replace __get_cpu_var uses
    mips: Replace __get_cpu_var uses
    MIPS: Replace __get_cpu_var uses in FPU emulator.
    arm: Replace __this_cpu_ptr with raw_cpu_ptr
    ...

    Linus Torvalds
     

09 Oct, 2014

1 commit

  • Pull timer fixes from Ingo Molnar:
    "Main changes:

    - Fix the deadlock reported by Dave Jones et al
    - Clean up and fix nohz_full interaction with arch abilities
    - nohz init code consolidation/cleanup"

    * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    nohz: nohz full depends on irq work self IPI support
    nohz: Consolidate nohz full init code
    arm64: Tell irq work about self IPI support
    arm: Tell irq work about self IPI support
    x86: Tell irq work about self IPI support
    irq_work: Force raised irq work to run on irq work interrupt
    irq_work: Introduce arch_irq_work_has_interrupt()
    nohz: Move nohz full init call to tick init

    Linus Torvalds
     

03 Oct, 2014

1 commit

  • This change adds support for clock_gettime with CLOCK_REALTIME
    and CLOCK_MONOTONIC using vDSO. It also updates the vdso
    struct nomenclature used for the clocks to match the x86 code
    to keep it easier to update going forward.

    We also support the *_COARSE clockid_t, for apps that want speed
    but aren't concerned about fine-grained timestamps; this saves
    about 20 cycles per call (see http://lwn.net/Articles/342018/).

    Signed-off-by: Chris Metcalf
    Acked-by: John Stultz

    Chris Metcalf
     

02 Oct, 2014

6 commits

  • Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Both strncpy and strlcpy suffer from the fact that they do
    partial copies of strings into the destination when the target
    buffer is too small. This is frequently pointless since an
    overflow of the target buffer may make the result invalid.

    strncpy() makes it relatively hard to even detect the error
    condition, and with strlcpy() you have to duplicate the buffer
    size parameter to test to see if the result exceeds it.
    By returning zero in the failure case, we both make testing
    for it easy, and by simply not copying anything in that case,
    we make it mandatory for callers to test the error code.

    To catch lazy programmers who don't check, we also place a NUL at
    the start of the destination buffer (if there is space) to
    ensure that the result is an invalid string.

    At some point it may make sense to promote strscpy() to
    a global platform-independent function, but other than the
    reviewers, no one was interested on LKML, so for now leave
    the strscpy() function as file-static.

    Reviewed-by: Randy Dunlap
    Reviewed-by: Rickard Strandqvist
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Signed-off-by: Chris Metcalf

    Kurt McAlpine
     
  • Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Use standard __init_begin and __init_end instead.

    Signed-off-by: Geert Uytterhoeven
    Cc: Chris Metcalf
    Signed-off-by: Chris Metcalf

    Geert Uytterhoeven
     
  • ARRAY_SIZE is more concise to use when the size of an array is divided
    by the size of its type or the size of its first element.

    The semantic patch that makes this change is as follows:

    //
    @i@
    @@

    @@
    type T;
    T[] E;
    @@

    - (sizeof(E)/sizeof(T))
    + ARRAY_SIZE(E)
    //

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Chris Metcalf

    Himangi Saraogi
     

14 Sep, 2014

1 commit

  • The nohz full code needs irq work to trigger its own interrupt so that
    the subsystem can work even when the tick is stopped.

    Lets introduce arch_irq_work_has_interrupt() that archs can override to
    tell about their support for this ability.

    Signed-off-by: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Frederic Weisbecker

    Peter Zijlstra
     

30 Aug, 2014

2 commits

  • Fix building errors occuring due to a missing export of
    flush_icache_range() in

    kisskb.ellerman.id.au/kisskb/buildresult/11677809/

    ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!

    Signed-off-by: Pranith Kumar
    Reported-by: Geert Uytterhoeven
    Acked-by: Vineet Gupta [arc]
    Acked-by: Richard Kuo [hexagon]
    Cc: Chris Metcalf
    Cc: Chris Zankel
    Acked-by: Max Filippov [xtensa]
    Cc: Noam Camus
    Cc: Masami Hiramatsu
    Acked-by: Zhigang Lu [tile]
    Cc: Kirill Tkhai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pranith Kumar
     
  • New system call depends on crypto. As it did not have a separate config
    option, CONFIG_KEXEC was modified to select CRYPTO and CRYPTO_SHA256.

    But now previous patch introduced a new config option for new syscall.
    So CONFIG_KEXEC does not require crypto. Remove that dependency.

    Signed-off-by: Vivek Goyal
    Cc: Eric Biederman
    Cc: H. Peter Anvin
    Cc: Shaun Ruffell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

27 Aug, 2014

2 commits

  • Signed-off-by: Christoph Lameter
    Signed-off-by: Tejun Heo

    Christoph Lameter
     
  • __get_cpu_var() is used for multiple purposes in the kernel source. One of
    them is address calculation via the form &__get_cpu_var(x). This calculates
    the address for the instance of the percpu variable of the current processor
    based on an offset.

    Other use cases are for storing and retrieving data from the current
    processors percpu area. __get_cpu_var() can be used as an lvalue when
    writing data or on the right side of an assignment.

    __get_cpu_var() is defined as :

    #define __get_cpu_var(var) (*this_cpu_ptr(&(var)))

    __get_cpu_var() always only does an address determination. However, store
    and retrieve operations could use a segment prefix (or global register on
    other platforms) to avoid the address calculation.

    this_cpu_write() and this_cpu_read() can directly take an offset into a
    percpu area and use optimized assembly code to read and write per cpu
    variables.

    This patch converts __get_cpu_var into either an explicit address
    calculation using this_cpu_ptr() or into a use of this_cpu operations that
    use the offset. Thereby address calculations are avoided and less registers
    are used when code is generated.

    At the end of the patch set all uses of __get_cpu_var have been removed so
    the macro is removed too.

    The patch set includes passes over all arches as well. Once these operations
    are used throughout then specialized macros can be defined in non -x86
    arches as well in order to optimize per cpu access by f.e. using a global
    register that may be set to the per cpu base.

    Transformations done to __get_cpu_var()

    1. Determine the address of the percpu instance of the current processor.

    DEFINE_PER_CPU(int, y);
    int *x = &__get_cpu_var(y);

    Converts to

    int *x = this_cpu_ptr(&y);

    2. Same as #1 but this time an array structure is involved.

    DEFINE_PER_CPU(int, y[20]);
    int *x = __get_cpu_var(y);

    Converts to

    int *x = this_cpu_ptr(y);

    3. Retrieve the content of the current processors instance of a per cpu
    variable.

    DEFINE_PER_CPU(int, y);
    int x = __get_cpu_var(y)

    Converts to

    int x = __this_cpu_read(y);

    4. Retrieve the content of a percpu struct

    DEFINE_PER_CPU(struct mystruct, y);
    struct mystruct x = __get_cpu_var(y);

    Converts to

    memcpy(&x, this_cpu_ptr(&y), sizeof(x));

    5. Assignment to a per cpu variable

    DEFINE_PER_CPU(int, y)
    __get_cpu_var(y) = x;

    Converts to

    __this_cpu_write(y, x);

    6. Increment/Decrement etc of a per cpu variable

    DEFINE_PER_CPU(int, y);
    __get_cpu_var(y)++

    Converts to

    __this_cpu_inc(y)

    Acked-by: Chris Metcalf
    Signed-off-by: Christoph Lameter
    Signed-off-by: Tejun Heo

    Christoph Lameter
     

10 Aug, 2014

1 commit

  • Pull arch signal handling cleanup from Richard Weinberger:
    "This patch series moves all remaining archs to the get_signal(),
    signal_setup_done() and sigsp() functions.

    Currently these archs use open coded variants of the said functions.
    Further, unused parameters get removed from get_signal_to_deliver(),
    tracehook_signal_handler() and signal_delivered().

    At the end of the day we save around 500 lines of code."

    * 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (43 commits)
    powerpc: Use sigsp()
    openrisc: Use sigsp()
    mn10300: Use sigsp()
    mips: Use sigsp()
    microblaze: Use sigsp()
    metag: Use sigsp()
    m68k: Use sigsp()
    m32r: Use sigsp()
    hexagon: Use sigsp()
    frv: Use sigsp()
    cris: Use sigsp()
    c6x: Use sigsp()
    blackfin: Use sigsp()
    avr32: Use sigsp()
    arm64: Use sigsp()
    arc: Use sigsp()
    sas_ss_flags: Remove nested ternary if
    Rip out get_signal_to_deliver()
    Clean up signal_delivered()
    tracehook_signal_handler: Remove sig, info, ka and regs
    ...

    Linus Torvalds
     

09 Aug, 2014

3 commits

  • Load purgatory code in RAM and relocate it based on the location.
    Relocation code has been inspired by module relocation code and purgatory
    relocation code in kexec-tools.

    Also compute the checksums of loaded kexec segments and store them in
    purgatory.

    Arch independent code provides this functionality so that arch dependent
    bootloaders can make use of it.

    Helper functions are provided to get/set symbol values in purgatory which
    are used by bootloaders later to set things like stack and entry point of
    second kernel etc.

    Signed-off-by: Vivek Goyal
    Cc: Borislav Petkov
    Cc: Michael Kerrisk
    Cc: Yinghai Lu
    Cc: Eric Biederman
    Cc: H. Peter Anvin
    Cc: Matthew Garrett
    Cc: Greg Kroah-Hartman
    Cc: Dave Young
    Cc: WANG Chao
    Cc: Baoquan He
    Cc: Andy Lutomirski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • The core mm code will provide a default gate area based on
    FIXADDR_USER_START and FIXADDR_USER_END if
    !defined(__HAVE_ARCH_GATE_AREA) && defined(AT_SYSINFO_EHDR).

    This default is only useful for ia64. arm64, ppc, s390, sh, tile, 64-bit
    UML, and x86_32 have their own code just to disable it. arm, 32-bit UML,
    and x86_64 have gate areas, but they have their own implementations.

    This gets rid of the default and moves the code into ia64.

    This should save some code on architectures without a gate area: it's now
    possible to inline the gate_area functions in the default case.

    Signed-off-by: Andy Lutomirski
    Acked-by: Nathan Lynch
    Acked-by: H. Peter Anvin
    Acked-by: Benjamin Herrenschmidt [in principle]
    Acked-by: Richard Weinberger [for um]
    Acked-by: Will Deacon [for arm64]
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chris Metcalf
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Nathan Lynch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

07 Aug, 2014

3 commits

  • Merge incoming from Andrew Morton:
    - Various misc things.
    - arch/sh updates.
    - Part of ocfs2. Review is slow.
    - Slab updates.
    - Most of -mm.
    - printk updates.
    - lib/ updates.
    - checkpatch updates.

    * emailed patches from Andrew Morton : (226 commits)
    checkpatch: update $declaration_macros, add uninitialized_var
    checkpatch: warn on missing spaces in broken up quoted
    checkpatch: fix false positives for --strict "space after cast" test
    checkpatch: fix false positive MISSING_BREAK warnings with --file
    checkpatch: add test for native c90 types in unusual order
    checkpatch: add signed generic types
    checkpatch: add short int to c variable types
    checkpatch: add for_each tests to indentation and brace tests
    checkpatch: fix brace style misuses of else and while
    checkpatch: add --fix option for a couple OPEN_BRACE misuses
    checkpatch: use the correct indentation for which()
    checkpatch: add fix_insert_line and fix_delete_line helpers
    checkpatch: add ability to insert and delete lines to patch/file
    checkpatch: add an index variable for fixed lines
    checkpatch: warn on break after goto or return with same tab indentation
    checkpatch: emit a warning on file add/move/delete
    checkpatch: add test for commit id formatting style in commit log
    checkpatch: emit fewer kmalloc_array/kcalloc conversion warnings
    checkpatch: improve "no space after cast" test
    checkpatch: allow multiple const * types
    ...

    Linus Torvalds
     
  • Pull SCSI updates from James Bottomley:
    "This patch set consists of the usual driver updates (ufs, storvsc,
    pm8001 hpsa). It also has removal of the user space target driver
    code (everyone is using LIO now), a partial PCI MSI-X update, more
    multi-queue updates, conversion to 64 bit LUNs (so we could
    theoretically cope with any LUN returned by a device) and placeholder
    support for the ZBC device type (Shingle drives), plus an assortment
    of minor updates and bug fixes"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (143 commits)
    scsi: do not issue SCSI RSOC command to Promise Vtrak E610f
    vmw_pvscsi: Use pci_enable_msix_exact() instead of pci_enable_msix()
    pm8001: Fix invalid return when request_irq() failed
    lpfc: Remove superfluous call to pci_disable_msix()
    isci: Use pci_enable_msix_exact() instead of pci_enable_msix()
    bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()
    bfa: Cleanup bfad_setup_intr() function
    bfa: Do not call pci_enable_msix() after it failed once
    fnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
    scsi: use short driver name for per-driver cmd slab caches
    scsi_debug: support scsi-mq, queues and locks
    Drivers: add blist flags
    scsi: ufs: fix endianness sparse warnings
    scsi: ufs: make undeclared functions static
    bnx2i: Update driver version to 2.7.10.1
    pm8001: fix a memory leak in nvmd_resp
    pm8001: fix update_flash
    pm8001: fix a memory leak in flash_update
    pm8001: Cleaning up uninitialized variables
    pm8001: Fix to remove null pointer checks that could never happen
    ...

    Linus Torvalds
     
  • Currently map_vm_area() takes (struct page *** pages) as third argument,
    and after mapping, it moves (*pages) to point to (*pages +
    nr_mappped_pages).

    It looks like this kind of increment is useless to its caller these
    days. The callers don't care about the increments and actually they're
    trying to avoid this by passing another copy to map_vm_area().

    The caller can always guarantee all the pages can be mapped into vm_area
    as specified in first argument and the caller only cares about whether
    map_vm_area() fails or not.

    This patch cleans up the pointer movement in map_vm_area() and updates
    its callers accordingly.

    Signed-off-by: WANG Chao
    Cc: Zhang Yanfei
    Acked-by: Greg Kroah-Hartman
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Chao
     

06 Aug, 2014

1 commit