19 Dec, 2014

1 commit

  • Pull KVM update from Paolo Bonzini:
    "3.19 changes for KVM:

    - spring cleaning: removed support for IA64, and for hardware-
    assisted virtualization on the PPC970

    - ARM, PPC, s390 all had only small fixes

    For x86:
    - small performance improvements (though only on weird guests)
    - usual round of hardware-compliancy fixes from Nadav
    - APICv fixes
    - XSAVES support for hosts and guests. XSAVES hosts were broken
    because the (non-KVM) XSAVES patches inadvertently changed the KVM
    userspace ABI whenever XSAVES was enabled; hence, this part is
    going to stable. Guest support is just a matter of exposing the
    feature and CPUID leaves support"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (179 commits)
    KVM: move APIC types to arch/x86/
    KVM: PPC: Book3S: Enable in-kernel XICS emulation by default
    KVM: PPC: Book3S HV: Improve H_CONFER implementation
    KVM: PPC: Book3S HV: Fix endianness of instruction obtained from HEIR register
    KVM: PPC: Book3S HV: Remove code for PPC970 processors
    KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions
    KVM: PPC: Book3S HV: Simplify locking around stolen time calculations
    arch: powerpc: kvm: book3s_paired_singles.c: Remove unused function
    arch: powerpc: kvm: book3s_pr.c: Remove unused function
    arch: powerpc: kvm: book3s.c: Remove some unused functions
    arch: powerpc: kvm: book3s_32_mmu.c: Remove unused function
    KVM: PPC: Book3S HV: Check wait conditions before sleeping in kvmppc_vcore_blocked
    KVM: PPC: Book3S HV: ptes are big endian
    KVM: PPC: Book3S HV: Fix inaccuracies in ICP emulation for H_IPI
    KVM: PPC: Book3S HV: Fix KSM memory corruption
    KVM: PPC: Book3S HV: Fix an issue where guest is paused on receiving HMI
    KVM: PPC: Book3S HV: Fix computation of tlbie operand
    KVM: PPC: Book3S HV: Add missing HPTE unlock
    KVM: PPC: BookE: Improve irq inject tracepoint
    arm/arm64: KVM: Require in-kernel vgic for the arch timers
    ...

    Linus Torvalds
     

17 Dec, 2014

1 commit

  • Pull arm64 fixes from Will Deacon:
    "Given that my availability next week is likely to be poor, here are
    three arm64 fixes to resolve some issues introduced by features merged
    last week. I was going to wait until -rc1, but it doesn't make much
    sense to sit on fixes.

    Fix some fallout introduced during the merge window:

    - Build failure when PM_SLEEP is disabled but CPU_IDLE is enabled
    - Compiler warning from page table dumper w/ 48-bit VAs
    - Erroneous page table truncation in reported dump"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: mm: dump: don't skip final region
    arm64: mm: dump: fix shift warning
    arm64: psci: Fix build breakage without PM_SLEEP

    Linus Torvalds
     

16 Dec, 2014

1 commit

  • Pull irq domain ARM updates from Thomas Gleixner:
    "This set of changes make use of hierarchical irqdomains to provide:

    - MSI/ITS support for GICv3
    - MSI support for GICv2m
    - Interrupt polarity extender for GICv1

    Marc has come more cleanups for the existing extension hooks of GIC in
    the pipeline, but they are going to be 3.20 material"

    * 'irq-irqdomain-arm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
    irqchip: gicv3-its: Fix ITT allocation
    irqchip: gicv3-its: Move some alloc/free code to activate/deactivate
    irqchip: gicv3-its: Fix domain free in multi-MSI case
    irqchip: gic: Remove warning by including linux/irqdomain.h
    irqchip: gic-v2m: Add DT bindings for GICv2m
    irqchip: gic-v2m: Add support for ARM GICv2m MSI(-X) doorbell
    irqchip: mtk-sysirq: dt-bindings: Add bindings for mediatek sysirq
    irqchip: mtk-sysirq: Add sysirq interrupt polarity support
    irqchip: gic: Support hierarchy irq domain.
    irqchip: GICv3: Binding updates for ITS
    irqchip: GICv3: ITS: enable compilation of the ITS driver
    irqchip: GICv3: ITS: plug ITS init into main GICv3 code
    irqchip: GICv3: ITS: DT probing and initialization
    irqchip: GICv3: ITS: MSI support
    irqchip: GICv3: ITS: device allocation and configuration
    irqchip: GICv3: ITS: tables allocators
    irqchip: GICv3: ITS: LPI allocator
    irqchip: GICv3: ITS: irqchip implementation
    irqchip: GICv3: ITS command queue
    irqchip: GICv3: rework redistributor structure
    ...

    Linus Torvalds
     

14 Dec, 2014

3 commits

  • Pull crypto update from Herbert Xu:
    - The crypto API is now documented :)
    - Disallow arbitrary module loading through crypto API.
    - Allow get request with empty driver name through crypto_user.
    - Allow speed testing of arbitrary hash functions.
    - Add caam support for ctr(aes), gcm(aes) and their derivatives.
    - nx now supports concurrent hashing properly.
    - Add sahara support for SHA1/256.
    - Add ARM64 version of CRC32.
    - Misc fixes.

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (77 commits)
    crypto: tcrypt - Allow speed testing of arbitrary hash functions
    crypto: af_alg - add user space interface for AEAD
    crypto: qat - fix problem with coalescing enable logic
    crypto: sahara - add support for SHA1/256
    crypto: sahara - replace tasklets with kthread
    crypto: sahara - add support for i.MX53
    crypto: sahara - fix spinlock initialization
    crypto: arm - replace memset by memzero_explicit
    crypto: powerpc - replace memset by memzero_explicit
    crypto: sha - replace memset by memzero_explicit
    crypto: sparc - replace memset by memzero_explicit
    crypto: algif_skcipher - initialize upon init request
    crypto: algif_skcipher - removed unneeded code
    crypto: algif_skcipher - Fixed blocking recvmsg
    crypto: drbg - use memzero_explicit() for clearing sensitive data
    crypto: drbg - use MODULE_ALIAS_CRYPTO
    crypto: include crypto- module prefix in template
    crypto: user - add MODULE_ALIAS
    crypto: sha-mb - remove a bogus NULL check
    crytpo: qat - Fix 64 bytes requests
    ...

    Linus Torvalds
     
  • Merge second patchbomb from Andrew Morton:
    - the rest of MM
    - misc fs fixes
    - add execveat() syscall
    - new ratelimit feature for fault-injection
    - decompressor updates
    - ipc/ updates
    - fallocate feature creep
    - fsnotify cleanups
    - a few other misc things

    * emailed patches from Andrew Morton : (99 commits)
    cgroups: Documentation: fix trivial typos and wrong paragraph numberings
    parisc: percpu: update comments referring to __get_cpu_var
    percpu: update local_ops.txt to reflect this_cpu operations
    percpu: remove __get_cpu_var and __raw_get_cpu_var macros
    fsnotify: remove destroy_list from fsnotify_mark
    fsnotify: unify inode and mount marks handling
    fallocate: create FAN_MODIFY and IN_MODIFY events
    mm/cma: make kmemleak ignore CMA regions
    slub: fix cpuset check in get_any_partial
    slab: fix cpuset check in fallback_alloc
    shmdt: use i_size_read() instead of ->i_size
    ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
    ipc/msg: increase MSGMNI, remove scaling
    ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
    ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
    lib/decompress.c: consistency of compress formats for kernel image
    decompress_bunzip2: off by one in get_next_block()
    usr/Kconfig: make initrd compression algorithm selection not expert
    fault-inject: add ratelimit option
    ratelimit: add initialization macro
    ...

    Linus Torvalds
     
  • Following the suggestions from Andrew Morton and Stephen Rothwell,
    Dont expand the ARCH list in kernel/gcov/Kconfig. Instead,
    define a ARCH_HAS_GCOV_PROFILE_ALL bool which architectures
    can enable.

    set ARCH_HAS_GCOV_PROFILE_ALL on Architectures where it was
    previously allowed + ARM64 which I tested.

    Signed-off-by: Riku Voipio
    Cc: Peter Oberparleiter
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Riku Voipio
     

13 Dec, 2014

5 commits

  • Introduce a new function to unmap user RAM regions in the stage2 page
    tables. This is needed on reboot (or when the guest turns off the MMU)
    to ensure we fault in pages again and make the dcache, RAM, and icache
    coherent.

    Using unmap_stage2_range for the whole guest physical range does not
    work, because that unmaps IO regions (such as the GIC) which will not be
    recreated or in the best case faulted in on a page-by-page basis.

    Call this function on secondary and subsequent calls to the
    KVM_ARM_VCPU_INIT ioctl so that a reset VCPU will detect the guest
    Stage-1 MMU is off when faulting in pages and make the caches coherent.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     
  • When a vcpu calls SYSTEM_OFF or SYSTEM_RESET with PSCI v0.2, the vcpus
    should really be turned off for the VM adhering to the suggestions in
    the PSCI spec, and it's the sane thing to do.

    Also, clarify the behavior and expectations for exits to user space with
    the KVM_EXIT_SYSTEM_EVENT case.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     
  • It is not clear that this ioctl can be called multiple times for a given
    vcpu. Userspace already does this, so clarify the ABI.

    Also specify that userspace is expected to always make secondary and
    subsequent calls to the ioctl with the same parameters for the VCPU as
    the initial call (which userspace also already does).

    Add code to check that userspace doesn't violate that ABI in the future,
    and move the kvm_vcpu_set_target() function which is currently
    duplicated between the 32-bit and 64-bit versions in guest.c to a common
    static function in arm.c, shared between both architectures.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     
  • When userspace resets the vcpu using KVM_ARM_VCPU_INIT, we should also
    reset the HCR, because we now modify the HCR dynamically to
    enable/disable trapping of guest accesses to the VM registers.

    This is crucial for reboot of VMs working since otherwise we will not be
    doing the necessary cache maintenance operations when faulting in pages
    with the guest MMU off.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     
  • Pull another networking update from David Miller:
    "Small follow-up to the main merge pull from the other day:

    1) Alexander Duyck's DMA memory barrier patch set.

    2) cxgb4 driver fixes from Karen Xie.

    3) Add missing export of fixed_phy_register() to modules, from Mark
    Salter.

    4) DSA bug fixes from Florian Fainelli"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (24 commits)
    net/macb: add TX multiqueue support for gem
    linux/interrupt.h: remove the definition of unused tasklet_hi_enable
    jme: replace calls to redundant function
    net: ethernet: davicom: Allow to select DM9000 for nios2
    net: ethernet: smsc: Allow to select SMC91X for nios2
    cxgb4: Add support for QSA modules
    libcxgbi: fix freeing skb prematurely
    cxgb4i: use set_wr_txq() to set tx queues
    cxgb4i: handle non-pdu-aligned rx data
    cxgb4i: additional types of negative advice
    cxgb4/cxgb4i: set the max. pdu length in firmware
    cxgb4i: fix credit check for tx_data_wr
    cxgb4i: fix tx immediate data credit check
    net: phy: export fixed_phy_register()
    fib_trie: Fix trie balancing issue if new node pushes down existing node
    vlan: Add ability to always enable TSO/UFO
    r8169:update rtl8168g pcie ephy parameter
    net: dsa: bcm_sf2: force link for all fixed PHY devices
    fm10k/igb/ixgbe: Use dma_rmb on Rx descriptor reads
    r8169: Use dma_rmb() and dma_wmb() for DescOwn checks
    ...

    Linus Torvalds
     

12 Dec, 2014

4 commits

  • Pull percpu updates from Tejun Heo:
    "Nothing interesting. A patch to convert the remaining __get_cpu_var()
    users, another to fix non-critical off-by-one in an assertion and a
    cosmetic conversion to lockless_dereference() in percpu-ref.

    The back-merge from mainline is to receive lockless_dereference()"

    * 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: Replace smp_read_barrier_depends() with lockless_dereference()
    percpu: Convert remaining __get_cpu_var uses in 3.18-rcX
    percpu: off by one in BUG_ON()

    Linus Torvalds
     
  • Pull xen features and fixes from David Vrabel:

    - Fully support non-coherent devices on ARM by introducing the
    mechanisms to request the hypervisor to perform the required cache
    maintainance operations.

    - A number of pciback bug fixes and cleanups. Notably a deadlock fix
    if a PCI device was manually uunbound and a fix for incorrectly
    restoring state after a function reset.

    - In x86 PVHVM guests, use the APIC for interrupts if this has been
    virtualized by the hardware. This reduces the number of interrupt-
    related VM exits on such hardware.

    * tag 'stable/for-linus-3.19-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (26 commits)
    Revert "swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single"
    xen/pci: Use APIC directly when APIC virtualization hardware is available
    xen/pci: Defer initialization of MSI ops on HVM guests
    xen-pciback: drop SR-IOV VFs when PF driver unloads
    xen/pciback: Restore configuration space when detaching from a guest.
    PCI: Expose pci_load_saved_state for public consumption.
    xen/pciback: Remove tons of dereferences
    xen/pciback: Print out the domain owning the device.
    xen/pciback: Include the domain id if removing the device whilst still in use
    driver core: Provide an wrapper around the mutex to do lockdep warnings
    xen/pciback: Don't deadlock when unbinding.
    swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single
    swiotlb-xen: call xen_dma_sync_single_for_device when appropriate
    swiotlb-xen: remove BUG_ON in xen_bus_to_phys
    swiotlb-xen: pass dev_addr to xen_dma_unmap_page and xen_dma_sync_single_for_cpu
    xen/arm: introduce GNTTABOP_cache_flush
    xen/arm/arm64: introduce xen_arch_need_swiotlb
    xen/arm/arm64: merge xen/mm32.c into xen/mm.c
    xen/arm: use hypercall to flush caches in map_page
    xen: add a dma_addr_t dev_addr argument to xen_dma_map_page
    ...

    Linus Torvalds
     
  • There are a number of situations where the mandatory barriers rmb() and
    wmb() are used to order memory/memory operations in the device drivers
    and those barriers are much heavier than they actually need to be. For
    example in the case of PowerPC wmb() calls the heavy-weight sync
    instruction when for coherent memory operations all that is really needed
    is an lsync or eieio instruction.

    This commit adds a coherent only version of the mandatory memory barriers
    rmb() and wmb(). In most cases this should result in the barrier being the
    same as the SMP barriers for the SMP case, however in some cases we use a
    barrier that is somewhere in between rmb() and smp_rmb(). For example on
    ARM the rmb barriers break down as follows:

    Barrier Call Explanation
    --------- -------- ----------------------------------
    rmb() dsb() Data synchronization barrier - system
    dma_rmb() dmb(osh) data memory barrier - outer sharable
    smp_rmb() dmb(ish) data memory barrier - inner sharable

    These new barriers are not as safe as the standard rmb() and wmb().
    Specifically they do not guarantee ordering between coherent and incoherent
    memories. The primary use case for these would be to enforce ordering of
    reads and writes when accessing coherent memory that is shared between the
    CPU and a device.

    It may also be noted that there is no dma_mb(). Most architectures don't
    provide a good mechanism for performing a coherent only full barrier without
    resorting to the same mechanism used in mb(). As such there isn't much to
    be gained in trying to define such a function.

    Cc: Frederic Weisbecker
    Cc: Mathieu Desnoyers
    Cc: Michael Ellerman
    Cc: Michael Neuling
    Cc: Russell King
    Cc: Geert Uytterhoeven
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Tony Luck
    Cc: Oleg Nesterov
    Cc: "Paul E. McKenney"
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Will Deacon
    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

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

  • If the final page table entry we walk is a valid mapping, the page table
    dumping code will not log the region this entry is part of, as the final
    note_page call in ptdump_show will trigger an early return. Luckily this
    isn't seen on contemporary systems as they typically don't have enough
    RAM to extend the linear mapping right to the end of the address space.

    In note_page, we log a region when we reach its end (i.e. we hit an
    entry immediately afterwards which has different prot bits or is
    invalid). The final entry has no subsequent entry, so we will not log
    this immediately. We try to cater for this with a subsequent call to
    note_page in ptdump_show, but this returns early as 0 < LOWEST_ADDR, and
    hence we will skip a valid mapping if it spans to the final entry we
    note.

    Unlike 32-bit ARM, the pgd with the kernel mapping is never shared with
    user mappings, so we do not need the check to ensure we don't log user
    page tables. Due to the way addr is constructed in the walk_* functions,
    it can never be less than LOWEST_ADDR when walking the page tables, so
    it is not necessary to avoid dereferencing invalid table addresses. The
    existing checks for st->current_prot and st->marker[1].start_address are
    sufficient to ensure we will not print and/or dereference garbage when
    trying to log information.

    This patch removes the unnecessary check against LOWEST_ADDR, ensuring
    we log all regions in the kernel page table, including those which span
    right to the end of the address space.

    Cc: Kees Cook
    Acked-by: Laura Abbott
    Acked-by: Steve Capper
    Signed-off-by: Mark Rutland
    Signed-off-by: Will Deacon

    Mark Rutland
     
  • When building with 48-bit VAs, it's possible to get the following
    warning when building the arm64 page table dumping code:

    arch/arm64/mm/dump.c: In function ‘walk_pgd’:
    arch/arm64/mm/dump.c:266:2: warning: right shift count >= width of type
    pgd_t *pgd = pgd_offset(mm, 0);
    ^

    As pgd_offset is a macro and the second argument is not cast to any
    particular type, the zero will be given integer type by the compiler.
    As pgd_offset passes the pargument to pgd_index, we then try to shift
    the 32-bit integer by at least 39 bits (for 4k pages).

    Elsewhere the pgd_offset is passed a second argument of unsigned long
    type, so let's do the same here by passing '0UL' rather than '0'.

    Cc: Kees Cook
    Acked-by: Laura Abbott
    Acked-by: Steve Capper
    Signed-off-by: Mark Rutland
    Signed-off-by: Will Deacon

    Mark Rutland
     
  • Fix build failure of defconfig when PM_SLEEP is disabled (e.g. by
    disabling SUSPEND) and CPU_IDLE enabled:

    arch/arm64/kernel/psci.c:543:2: error: unknown field ‘cpu_suspend’ specified in initializer
    .cpu_suspend = cpu_psci_cpu_suspend,
    ^
    arch/arm64/kernel/psci.c:543:2: warning: initialization from incompatible pointer type [enabled by default]
    arch/arm64/kernel/psci.c:543:2: warning: (near initialization for ‘cpu_psci_ops.cpu_prepare’) [enabled by default]
    make[1]: *** [arch/arm64/kernel/psci.o] Error 1

    The cpu_operations.cpu_suspend field exists only if ARM64_CPU_SUSPEND is
    defined, not CPU_IDLE.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Will Deacon

    Krzysztof Kozlowski
     
  • As a small zero page, huge zero page should not be accounted in smaps
    report as normal page.

    For small pages we rely on vm_normal_page() to filter out zero page, but
    vm_normal_page() is not designed to handle pmds. We only get here due
    hackish cast pmd to pte in smaps_pte_range() -- pte and pmd format is not
    necessary compatible on each and every architecture.

    Let's add separate codepath to handle pmds. follow_trans_huge_pmd() will
    detect huge zero page for us.

    We would need pmd_dirty() helper to do this properly. The patch adds it
    to THP-enabled architectures which don't yet have one.

    [akpm@linux-foundation.org: use do_div to fix 32-bit build]
    Signed-off-by: "Kirill A. Shutemov"
    Reported-by: Fengguang Wu
    Tested-by: Fengwei Yin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     
  • 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
     

10 Dec, 2014

5 commits

  • Pull asm-generic asm/io.h rewrite from Arnd Bergmann:
    "While there normally is no reason to have a pull request for
    asm-generic but have all changes get merged through whichever tree
    needs them, I do have a series for 3.19.

    There are two sets of patches that change significant portions of
    asm/io.h, and this branch contains both in order to resolve the
    conflicts:

    - Will Deacon has done a set of patches to ensure that all
    architectures define {read,write}{b,w,l,q}_relaxed() functions or
    get them by including asm-generic/io.h.

    These functions are commonly used on ARM specific drivers to avoid
    expensive L2 cache synchronization implied by the normal
    {read,write}{b,w,l,q}, but we need to define them on all
    architectures in order to share the drivers across architectures
    and to enable CONFIG_COMPILE_TEST configurations for them

    - Thierry Reding has done an unrelated set of patches that extends
    the asm-generic/io.h file to the degree necessary to make it useful
    on ARM64 and potentially other architectures"

    * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (29 commits)
    ARM64: use GENERIC_PCI_IOMAP
    sparc: io: remove duplicate relaxed accessors on sparc32
    ARM: sa11x0: Use void __iomem * in MMIO accessors
    arm64: Use include/asm-generic/io.h
    ARM: Use include/asm-generic/io.h
    asm-generic/io.h: Implement generic {read,write}s*()
    asm-generic/io.h: Reconcile I/O accessor overrides
    /dev/mem: Use more consistent data types
    Change xlate_dev_{kmem,mem}_ptr() prototypes
    ARM: ixp4xx: Properly override I/O accessors
    ARM: ixp4xx: Fix build with IXP4XX_INDIRECT_PCI
    ARM: ebsa110: Properly override I/O accessors
    ARC: Remove redundant PCI_IOBASE declaration
    documentation: memory-barriers: clarify relaxed io accessor semantics
    x86: io: implement dummy relaxed accessor macros for writes
    tile: io: implement dummy relaxed accessor macros for writes
    sparc: io: implement dummy relaxed accessor macros for writes
    powerpc: io: implement dummy relaxed accessor macros for writes
    parisc: io: implement dummy relaxed accessor macros for writes
    mn10300: io: implement dummy relaxed accessor macros for writes
    ...

    Linus Torvalds
     
  • Pull ARM64 SoC changes from Arnd Bergmann:
    "This adds support for two new ARM64 platforms:

    - ARM Juno
    - AMD Seattle

    We had submissions for a number of additional platforms from Samsung,
    Freescale and Spreadtrum but are still working out the best process
    for getting these merged"

    * tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: amd-seattle: Fix PCI bus range due to SMMU limitation
    arm64: ARM: Fix the Generic Timers interrupt active level description
    arm64: amd-seattle: Adding device tree for AMD Seattle platform
    arm64: Add Juno board device tree.
    arm64: Create link to include/dt-bindings to enable C preprocessor use.

    Linus Torvalds
     
  • Pull ARM SoC driver updates from Arnd Bergmann:
    "These are changes for drivers that are intimately tied to some SoC and
    for some reason could not get merged through the respective subsystem
    maintainer tree.

    The largest single change here this time around is the Tegra
    iommu/memory controller driver, which gets updated to the new iommu DT
    binding. More drivers like this are likely to follow for the
    following merge window, but we should be able to do those through the
    iommu maintainer.

    Other notable changes are:
    - reset controller drivers from the reset maintainer (socfpga, sti,
    berlin)
    - fixes for the keystone navigator driver merged last time
    - at91 rtc driver changes related to the at91 cleanups
    - ARM perf driver changes from Will Deacon
    - updates for the brcmstb_gisb driver"

    * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits)
    clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
    clocksource: arch_timer: Fix code to use physical timers when requested
    memory: Add NVIDIA Tegra memory controller support
    bus: brcmstb_gisb: Add register offset tables for older chips
    bus: brcmstb_gisb: Look up register offsets in a table
    bus: brcmstb_gisb: Introduce wrapper functions for MMIO accesses
    bus: brcmstb_gisb: Make the driver buildable on MIPS
    of: Add NVIDIA Tegra memory controller binding
    ARM: tegra: Move AHB Kconfig to drivers/amba
    amba: Add Kconfig file
    clk: tegra: Implement memory-controller clock
    serial: samsung: Fix serial config dependencies for exynos7
    bus: brcmstb_gisb: resolve section mismatch
    ARM: common: edma: edma_pm_resume may be unused
    ARM: common: edma: add suspend resume hook
    powerpc/iommu: Rename iommu_[un]map_sg functions
    rtc: at91sam9: add DT bindings documentation
    rtc: at91sam9: use clk API instead of relying on AT91_SLOW_CLOCK
    ARM: at91: add clk_lookup entry for RTT devices
    rtc: at91sam9: rework the Kconfig description
    ...

    Linus Torvalds
     
  • Pull ARM SoC cleanups from Arnd Bergmann:
    "The remaining cleanups for 3.19 are to a large part result of
    devicetree conversion nearing completion on two other platforms
    besides AT91:

    - Like AT91, Renesas shmobile is in the process to migrate to DT and
    multiplatform, but using a different approach of doing it one SoC
    at a time. For 3.19, the r8a7791 platform and associated "Koelsch"
    board are considered complete and we remove the non-DT
    non-multiplatform support for this.

    - The ARM Versatile Express has supported DT and multiplatform for a
    long time, but we have still kept the legacy board files around,
    because not all drivers were fully working before. We have finally
    taken the last step to remove the board files.

    Other changes in this branch are preparation for the later branches or
    just unrelated to the more interesting changes:

    - The dts files for arm64 get moved into per-vendor directories for a
    clearer structure.

    - Some dead code removal (zynq, exynos, davinci, imx)

    - Using pr_*() macros more consistently instead of printk(KERN_*) in
    some platform code"

    * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (71 commits)
    ARM: zynq: Remove secondary_startup() declaration from header
    ARM: vexpress: Enable regulator framework when MMCI is in use
    ARM: vexpress: Remove non-DT code
    ARM: imx: Remove unneeded .map_io initialization
    ARM: dts: imx6qdl-sabresd: Fix the microphone route
    ARM: imx: refactor mxc_iomux_mode()
    ARM: imx: simplify clk_pllv3_prepare()
    ARM: imx6q: drop unnecessary semicolon
    ARM: imx: clean up machine mxc_arch_reset_init_dt reset init
    ARM: dts: imx6qdl-rex: Remove unneeded 'fsl,mode' property
    ARM: dts: imx6qdl-gw5x: Remove unneeded 'fsl,mode' property
    ARM: dts: imx6qdl-sabresd: Use IMX6QDL_CLK_CKO define
    ARM: at91: remove useless init_time for DT-only SoCs
    ARM: davinci: Remove redundant casts
    ARM: davinci: Use standard logging styles
    ARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/
    ARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/
    ARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/
    ARM: EXYNOS: Remove unused static iomapping
    ARM: at91: fix build breakage due to legacy board removals
    ...

    Linus Torvalds
     
  • Pull arm64 updates from Will Deacon:
    "Here's the usual mixed bag of arm64 updates, also including some
    related EFI changes (Acked by Matt) and the MMU gather range cleanup
    (Acked by you).

    Changes include:
    - support for alternative instruction patching from Andre
    - seccomp from Akashi
    - some AArch32 instruction emulation, required by the Android folks
    - optimisations for exception entry/exit code, cmpxchg, pcpu atomics
    - mmu_gather range calculations moved into core code
    - EFI updates from Ard, including long-awaited SMBIOS support
    - /proc/cpuinfo fixes to align with the format used by arch/arm/
    - a few non-critical fixes across the architecture"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (70 commits)
    arm64: remove the unnecessary arm64_swiotlb_init()
    arm64: add module support for alternatives fixups
    arm64: perf: Prevent wraparound during overflow
    arm64/include/asm: Fixed a warning about 'struct pt_regs'
    arm64: Provide a namespace to NCAPS
    arm64: bpf: lift restriction on last instruction
    arm64: Implement support for read-mostly sections
    arm64: compat: align cacheflush syscall with arch/arm
    arm64: add seccomp support
    arm64: add SIGSYS siginfo for compat task
    arm64: add seccomp syscall for compat task
    asm-generic: add generic seccomp.h for secure computing mode 1
    arm64: ptrace: allow tracer to skip a system call
    arm64: ptrace: add NT_ARM_SYSTEM_CALL regset
    arm64: Move some head.text functions to executable section
    arm64: jump labels: NOP out NOP -> NOP replacement
    arm64: add support to dump the kernel page tables
    arm64: Add FIX_HOLE to permanent fixed addresses
    arm64: alternatives: fix pr_fmt string for consistency
    arm64: vmlinux.lds.S: don't discard .exit.* sections at link-time
    ...

    Linus Torvalds
     

05 Dec, 2014

4 commits

  • The commit 3690951fc6d42f3a0903987677d0e592c49dd8db
    (arm64: Use swiotlb late initialisation)
    switches the DMA mapping code to swiotlb_tlb_late_init_with_default_size(),
    the arm64_swiotlb_init() will not used anymore, so remove this function.

    Signed-off-by: Ding Tianhong
    Signed-off-by: Will Deacon

    Ding Tianhong
     
  • * clocksource/physical-timers:
    clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
    clocksource: arch_timer: Fix code to use physical timers when requested

    Olof Johansson
     
  • This is a bug fix for using physical arch timers when
    the arch_timer_use_virtual boolean is false. It restores the
    arch_counter_get_cntpct() function after removal in

    0d651e4e "clocksource: arch_timer: use virtual counters"

    We need this on certain ARMv7 systems which are architected like this:

    * The firmware doesn't know and doesn't care about hypervisor mode and
    we don't want to add the complexity of hypervisor there.

    * The firmware isn't involved in SMP bringup or resume.

    * The ARCH timer come up with an uninitialized offset between the
    virtual and physical counters. Each core gets a different random
    offset.

    * The device boots in "Secure SVC" mode.

    * Nothing has touched the reset value of CNTHCTL.PL1PCEN or
    CNTHCTL.PL1PCTEN (both default to 1 at reset)

    One example of such as system is RK3288 where it is much simpler to
    use the physical counter since there's nobody managing the offset and
    each time a core goes down and comes back up it will get reinitialized
    to some other random value.

    Fixes: 0d651e4e65e9 ("clocksource: arch_timer: use virtual counters")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sonny Rao
    Acked-by: Catalin Marinas
    Acked-by: Daniel Lezcano
    Signed-off-by: Olof Johansson

    Sonny Rao
     
  • Since PCIe is using SMMUv1 which only supports 15-bit stream ID,
    only 7-bit PCI bus id is used to specify stream ID. Therefore,
    we only limit the PCI bus range to 0x7f.

    Signed-off-by: Suravee Suthikulpanit
    Signed-off-by: Arnd Bergmann

    Suravee Suthikulpanit
     

04 Dec, 2014

8 commits

  • Merge xen/mm32.c into xen/mm.c.
    As a consequence the code gets compiled on arm64 too.

    Signed-off-by: Stefano Stabellini
    Reviewed-by: Catalin Marinas

    Stefano Stabellini
     
  • dev_addr is the machine address of the page.

    The new parameter can be used by the ARM and ARM64 implementations of
    xen_dma_map_page to find out if the page is a local page (pfn == mfn) or
    a foreign page (pfn != mfn).

    dev_addr could be retrieved again from the physical address, using
    pfn_to_mfn, but it requires accessing an rbtree. Since we already have
    the dev_addr in our hands at the call site there is no need to get the
    mfn twice.

    Signed-off-by: Stefano Stabellini
    Reviewed-by: Catalin Marinas
    Acked-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • Introduce a boolean flag and an accessor function to check whether a
    device is dma_coherent. Set the flag from set_arch_dma_coherent_ops.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Catalin Marinas
    Reviewed-by: Catalin Marinas

    Stefano Stabellini
     
  • Currently the kernel patches all necessary instructions once at boot
    time, so modules are not covered by this.
    Change the apply_alternatives() function to take a beginning and an
    end pointer and introduce a new variant (apply_alternatives_all()) to
    cover the existing use case for the static kernel image section.
    Add a module_finalize() function to arm64 to check for an
    alternatives section in a module and patch only the instructions from
    that specific area.
    Since that module code is not touched before the module
    initialization has ended, we don't need to halt the machine before
    doing the patching in the module's code.

    Signed-off-by: Andre Przywara
    Signed-off-by: Will Deacon

    Andre Przywara
     
  • If the overflow threshold for a counter is set above or near the
    0xffffffff boundary then the kernel may lose track of the overflow
    causing only events that occur *after* the overflow to be recorded.
    Specifically the problem occurs when the value of the performance counter
    overtakes its original programmed value due to wrap around.

    Typical solutions to this problem are either to avoid programming in
    values likely to be overtaken or to treat the overflow bit as the 33rd
    bit of the counter.

    Its somewhat fiddly to refactor the code to correctly handle the 33rd bit
    during irqsave sections (context switches for example) so instead we take
    the simpler approach of avoiding values likely to be overtaken.

    We set the limit to half of max_period because this matches the limit
    imposed in __hw_perf_event_init(). This causes a doubling of the interrupt
    rate for large threshold values, however even with a very fast counter
    ticking at 4GHz the interrupt rate would only be ~1Hz.

    Signed-off-by: Daniel Thompson
    Signed-off-by: Will Deacon

    Daniel Thompson
     
  • If I include asm/irq.h on the top of my code, and set ARCH=arm64,
    I'll get a compile warning, details are below:
    warning: ‘struct pt_regs’
    declared inside parameter list [enabled by default]

    This patch is suggested by Arnd, see:
    http://lists.infradead.org/pipermail/linux-arm-kernel/2014-December/308270.html

    Signed-off-by: Chunyan Zhang
    Signed-off-by: Will Deacon

    Chunyan Zhang
     
  • Building arm64.allmodconfig leads to the following warning:

    usb/gadget/function/f_ncm.c:203:0: warning: "NCAPS" redefined
    #define NCAPS (USB_CDC_NCM_NCAP_ETH_FILTER | USB_CDC_NCM_NCAP_CRC_MODE)
    ^
    In file included from /home/build/work/batch/arch/arm64/include/asm/io.h:32:0,
    from /home/build/work/batch/include/linux/clocksource.h:19,
    from /home/build/work/batch/include/clocksource/arm_arch_timer.h:19,
    from /home/build/work/batch/arch/arm64/include/asm/arch_timer.h:27,
    from /home/build/work/batch/arch/arm64/include/asm/timex.h:19,
    from /home/build/work/batch/include/linux/timex.h:65,
    from /home/build/work/batch/include/linux/sched.h:19,
    from /home/build/work/batch/arch/arm64/include/asm/compat.h:25,
    from /home/build/work/batch/arch/arm64/include/asm/stat.h:23,
    from /home/build/work/batch/include/linux/stat.h:5,
    from /home/build/work/batch/include/linux/module.h:10,
    from /home/build/work/batch/drivers/usb/gadget/function/f_ncm.c:19:
    arch/arm64/include/asm/cpufeature.h:27:0: note: this is the location of the previous definition
    #define NCAPS 2

    So add a ARM64 prefix to avoid such problem.

    Reported-by: Olof's autobuilder
    Signed-off-by: Fabio Estevam
    Signed-off-by: Will Deacon

    Fabio Estevam
     
  • Earlier implementation assumed last instruction is BPF_EXIT.
    Since this is no longer a restriction in eBPF, we remove this
    limitation.

    Per Alexei Starovoitov [1]:
    > classic BPF has a restriction that last insn is always BPF_RET.
    > eBPF doesn't have BPF_RET instruction and this restriction.
    > It has BPF_EXIT insn which can appear anywhere in the program
    > one or more times and it doesn't have to be last insn.

    [1] https://lkml.org/lkml/2014/11/27/2

    Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler")
    Acked-by: Alexei Starovoitov
    Signed-off-by: Zi Shen Lim
    Signed-off-by: Will Deacon

    Zi Shen Lim
     

03 Dec, 2014

1 commit


01 Dec, 2014

1 commit

  • Update handling of cacheflush syscall with changes made in arch/arm
    counterpart:
    - return error to userspace when flushing syscall fails
    - split user cache-flushing into interruptible chunks
    - don't bother rounding to nearest vma

    Signed-off-by: Vladimir Murzin
    [will: changed internal return value from -EINTR to 0 to match arch/arm/]
    Signed-off-by: Will Deacon

    Vladimir Murzin
     

29 Nov, 2014

1 commit