26 Apr, 2014

1 commit


25 Apr, 2014

3 commits

  • ARM64 has defined the spinlock for init_mm's context, so need initialize
    the spinlock structure; otherwise during the suspend flow it will dump
    the info for spinlock's bad magic warning as below:

    [ 39.084394] Disabling non-boot CPUs ...
    [ 39.092871] BUG: spinlock bad magic on CPU#1, swapper/1/0
    [ 39.092896] lock: init_mm+0x338/0x3e0, .magic: 00000000, .owner: /-1, .owner_cpu: 0
    [ 39.092907] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G O 3.10.33 #125
    [ 39.092912] Call trace:
    [ 39.092927] [] dump_backtrace+0x0/0x16c
    [ 39.092934] [] show_stack+0x10/0x1c
    [ 39.092947] [] dump_stack+0x1c/0x28
    [ 39.092953] [] spin_dump+0x78/0x88
    [ 39.092960] [] spin_bug+0x24/0x34
    [ 39.092971] [] do_raw_spin_lock+0x98/0x17c
    [ 39.092979] [] _raw_spin_lock_irqsave+0x4c/0x60
    [ 39.092990] [] set_mm_context+0x1c/0x6c
    [ 39.092996] [] __new_context+0x94/0x10c
    [ 39.093007] [] idle_task_exit+0x104/0x1b0
    [ 39.093014] [] cpu_die+0x14/0x74
    [ 39.093021] [] arch_cpu_idle_dead+0x8/0x14
    [ 39.093030] [] cpu_startup_entry+0x1ec/0x258
    [ 39.093036] [] secondary_start_kernel+0x114/0x124

    Signed-off-by: Leo Yan
    Acked-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Leo Yan
     
  • Sending a SIGTRAP to a user task after execution of a BRK instruction at
    EL0 is fundamental to the way in which software breakpoints work and
    doesn't deserve a warning to be logged in dmesg. Whilst the warning can
    be justified from EL1, do_debug_exception will already do the right thing,
    so simply remove the code altogether.

    Cc: Sandeepa Prabhu
    Reported-by: Kyrylo Tkachov
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • When arm64 moved over to the core mmu_gather, it lost the logic to
    flush THP TLB entries (tlb_remove_pmd_tlb_entry was removed and the
    core implementation only signals that the mmu_gather needs a flush).

    This patch ensures that tlb_add_flush is called for THP TLB entries.

    Signed-off-by: Steve Capper
    Acked-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Steve Capper
     

23 Apr, 2014

3 commits


09 Apr, 2014

1 commit

  • Pull second set of arm64 updates from Catalin Marinas:
    "A second pull request for this merging window, mainly with fixes and
    docs clarification:

    - Documentation clarification on CPU topology and booting
    requirements
    - Additional cache flushing during boot (needed in the presence of
    external caches or under virtualisation)
    - DMA range invalidation fix for non cache line aligned buffers
    - Build failure fix with !COMPAT
    - Kconfig update for STRICT_DEVMEM"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: Fix DMA range invalidation for cache line unaligned buffers
    arm64: Add missing Kconfig for CONFIG_STRICT_DEVMEM
    arm64: fix !CONFIG_COMPAT build failures
    Revert "arm64: virt: ensure visibility of __boot_cpu_mode"
    arm64: Relax the kernel cache requirements for boot
    arm64: Update the TCR_EL1 translation granule definitions for 16K pages
    ARM: topology: Make it clear that all CPUs need to be described

    Linus Torvalds
     

08 Apr, 2014

7 commits

  • If the buffer needing cache invalidation for inbound DMA does start or
    end on a cache line aligned address, we need to use the non-destructive
    clean&invalidate operation. This issue was introduced by commit
    7363590d2c46 (arm64: Implement coherent DMA API based on swiotlb).

    Signed-off-by: Catalin Marinas
    Reported-by: Jon Medhurst (Tixy)

    Catalin Marinas
     
  • Merge second patch-bomb from Andrew Morton:
    - the rest of MM
    - zram updates
    - zswap updates
    - exit
    - procfs
    - exec
    - wait
    - crash dump
    - lib/idr
    - rapidio
    - adfs, affs, bfs, ufs
    - cris
    - Kconfig things
    - initramfs
    - small amount of IPC material
    - percpu enhancements
    - early ioremap support
    - various other misc things

    * emailed patches from Andrew Morton : (156 commits)
    MAINTAINERS: update Intel C600 SAS driver maintainers
    fs/ufs: remove unused ufs_super_block_third pointer
    fs/ufs: remove unused ufs_super_block_second pointer
    fs/ufs: remove unused ufs_super_block_first pointer
    fs/ufs/super.c: add __init to init_inodecache()
    doc/kernel-parameters.txt: add early_ioremap_debug
    arm64: add early_ioremap support
    arm64: initialize pgprot info earlier in boot
    x86: use generic early_ioremap
    mm: create generic early_ioremap() support
    x86/mm: sparse warning fix for early_memremap
    lglock: map to spinlock when !CONFIG_SMP
    percpu: add preemption checks to __this_cpu ops
    vmstat: use raw_cpu_ops to avoid false positives on preemption checks
    slub: use raw_cpu_inc for incrementing statistics
    net: replace __this_cpu_inc in route.c with raw_cpu_inc
    modules: use raw_cpu_write for initialization of per cpu refcount.
    mm: use raw_cpu ops for determining current NUMA node
    percpu: add raw_cpu_ops
    slub: fix leak of 'name' in sysfs_slab_add
    ...

    Linus Torvalds
     
  • Add support for early IO or memory mappings which are needed before the
    normal ioremap() is usable. This also adds fixmap support for permanent
    fixed mappings such as that used by the earlyprintk device register
    region.

    Signed-off-by: Mark Salter
    Acked-by: Catalin Marinas
    Cc: Borislav Petkov
    Cc: Dave Young
    Cc: H. Peter Anvin
    Cc: Will Deacon
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Salter
     
  • Presently, paging_init() calls init_mem_pgprot() to initialize pgprot
    values used by macros such as PAGE_KERNEL, PAGE_KERNEL_EXEC, etc.

    The new fixmap and early_ioremap support also needs to use these macros
    before paging_init() is called. This patch moves the init_mem_pgprot()
    call out of paging_init() and into setup_arch() so that pgprot_default
    gets initialized in time for fixmap and early_ioremap.

    Signed-off-by: Mark Salter
    Acked-by: Catalin Marinas
    Cc: Will Deacon
    Cc: Borislav Petkov
    Cc: Dave Young
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Salter
     
  • If the renamed symbol is defined lib/iomap.c implements ioport_map and
    ioport_unmap and currently (nearly) all platforms define the port
    accessor functions outb/inb and friend unconditionally. So
    HAS_IOPORT_MAP is the better name for this.

    Consequently NO_IOPORT is renamed to NO_IOPORT_MAP.

    The motivation for this change is to reintroduce a symbol HAS_IOPORT
    that signals if outb/int et al are available. I will address that at
    least one merge window later though to keep surprises to a minimum and
    catch new introductions of (HAS|NO)_IOPORT.

    The changes in this commit were done using:

    $ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/'

    Signed-off-by: Uwe Kleine-König
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Pull CPU hotplug notifiers registration fixes from Rafael Wysocki:
    "The purpose of this single series of commits from Srivatsa S Bhat
    (with a small piece from Gautham R Shenoy) touching multiple
    subsystems that use CPU hotplug notifiers is to provide a way to
    register them that will not lead to deadlocks with CPU online/offline
    operations as described in the changelog of commit 93ae4f978ca7f ("CPU
    hotplug: Provide lockless versions of callback registration
    functions").

    The first three commits in the series introduce the API and document
    it and the rest simply goes through the users of CPU hotplug notifiers
    and converts them to using the new method"

    * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
    net/iucv/iucv.c: Fix CPU hotplug callback registration
    net/core/flow.c: Fix CPU hotplug callback registration
    mm, zswap: Fix CPU hotplug callback registration
    mm, vmstat: Fix CPU hotplug callback registration
    profile: Fix CPU hotplug callback registration
    trace, ring-buffer: Fix CPU hotplug callback registration
    xen, balloon: Fix CPU hotplug callback registration
    hwmon, via-cputemp: Fix CPU hotplug callback registration
    hwmon, coretemp: Fix CPU hotplug callback registration
    thermal, x86-pkg-temp: Fix CPU hotplug callback registration
    octeon, watchdog: Fix CPU hotplug callback registration
    oprofile, nmi-timer: Fix CPU hotplug callback registration
    intel-idle: Fix CPU hotplug callback registration
    clocksource, dummy-timer: Fix CPU hotplug callback registration
    drivers/base/topology.c: Fix CPU hotplug callback registration
    acpi-cpufreq: Fix CPU hotplug callback registration
    zsmalloc: Fix CPU hotplug callback registration
    scsi, fcoe: Fix CPU hotplug callback registration
    scsi, bnx2fc: Fix CPU hotplug callback registration
    scsi, bnx2i: Fix CPU hotplug callback registration
    ...

    Linus Torvalds
     
  • The Kconfig for CONFIG_STRICT_DEVMEM is missing despite being
    used in mmap.c. Add it.

    Signed-off-by: Laura Abbott
    Signed-off-by: Catalin Marinas

    Laura Abbott
     

07 Apr, 2014

1 commit

  • Recent arm64 builds using CONFIG_ARM64_64K_PAGES are failing with:

    arch/arm64/kernel/perf_regs.c: In function ‘perf_reg_abi’:
    arch/arm64/kernel/perf_regs.c:41:2: error: implicit declaration of function ‘is_compat_thread’

    arch/arm64/kernel/perf_event.c:1398:2: error: unknown type name ‘compat_uptr_t’

    This is due to some recent arm64 perf commits with compat support:

    commit 23c7d70d55c6d9:
    ARM64: perf: add support for frame pointer unwinding in compat mode

    commit 2ee0d7fd36a3f8:
    ARM64: perf: add support for perf registers API

    Those patches make the arm64 kernel unbuildable if CONFIG_COMPAT is not
    defined and CONFIG_ARM64_64K_PAGES depends on !CONFIG_COMPAT. This patch
    allows the arm64 kernel to build with and without CONFIG_COMPAT.

    Signed-off-by: Mark Salter
    Signed-off-by: Catalin Marinas

    Mark Salter
     

05 Apr, 2014

2 commits


03 Apr, 2014

4 commits

  • The current TCR register setting in arch/arm64/mm/proc.S assumes that
    TCR_EL1.TG* fields are one bit wide and bit 31 is RES1 (reserved, set to
    1). With the addition of 16K pages (currently unsupported in the
    kernel), the TCR_EL1.TG* fields have been extended to two bits. This
    patch updates the corresponding Linux definitions and drops the bit 31
    setting in proc.S in favour of the new macros.

    Signed-off-by: Catalin Marinas
    Reported-by: Joe Sylve

    Catalin Marinas
     
  • Pull kvm updates from Paolo Bonzini:
    "PPC and ARM do not have much going on this time. Most of the cool
    stuff, instead, is in s390 and (after a few releases) x86.

    ARM has some caching fixes and PPC has transactional memory support in
    guests. MIPS has some fixes, with more probably coming in 3.16 as
    QEMU will soon get support for MIPS KVM.

    For x86 there are optimizations for debug registers, which trigger on
    some Windows games, and other important fixes for Windows guests. We
    now expose to the guest Broadwell instruction set extensions and also
    Intel MPX. There's also a fix/workaround for OS X guests, nested
    virtualization features (preemption timer), and a couple kvmclock
    refinements.

    For s390, the main news is asynchronous page faults, together with
    improvements to IRQs (floating irqs and adapter irqs) that speed up
    virtio devices"

    * tag 'kvm-3.15-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (96 commits)
    KVM: PPC: Book3S HV: Save/restore host PMU registers that are new in POWER8
    KVM: PPC: Book3S HV: Fix decrementer timeouts with non-zero TB offset
    KVM: PPC: Book3S HV: Don't use kvm_memslots() in real mode
    KVM: PPC: Book3S HV: Return ENODEV error rather than EIO
    KVM: PPC: Book3S: Trim top 4 bits of physical address in RTAS code
    KVM: PPC: Book3S HV: Add get/set_one_reg for new TM state
    KVM: PPC: Book3S HV: Add transactional memory support
    KVM: Specify byte order for KVM_EXIT_MMIO
    KVM: vmx: fix MPX detection
    KVM: PPC: Book3S HV: Fix KVM hang with CONFIG_KVM_XICS=n
    KVM: PPC: Book3S: Introduce hypervisor call H_GET_TCE
    KVM: PPC: Book3S HV: Fix incorrect userspace exit on ioeventfd write
    KVM: s390: clear local interrupts at cpu initial reset
    KVM: s390: Fix possible memory leak in SIGP functions
    KVM: s390: fix calculation of idle_mask array size
    KVM: s390: randomize sca address
    KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP
    KVM: Bump KVM_MAX_IRQ_ROUTES for s390
    KVM: s390: irq routing for adapter interrupts.
    KVM: s390: adapter interrupt sources
    ...

    Linus Torvalds
     
  • Pull devicetree changes from Grant Likely:
    "Updates to devicetree core code. This branch contains the following
    notable changes:

    - add reserved memory binding
    - make struct device_node a kobject and remove legacy
    /proc/device-tree
    - ePAPR conformance fixes
    - update in-kernel DTC copy to version v1.4.0
    - preparatory changes for dynamic device tree overlays
    - minor bug fixes and documentation changes

    The most significant change in this branch is the conversion of struct
    device_node to be a kobject that is exposed via sysfs and removal of
    the old /proc/device-tree code. This simplifies the device tree
    handling code and tightens up the lifecycle on device tree nodes.

    [updated: added fix for dangling select PROC_DEVICETREE]"

    * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux: (29 commits)
    dt: Remove dangling "select PROC_DEVICETREE"
    of: Add support for ePAPR "stdout-path" property
    of: device_node kobject lifecycle fixes
    of: only scan for reserved mem when fdt present
    powerpc: add support for reserved memory defined by device tree
    arm64: add support for reserved memory defined by device tree
    of: add missing major vendors
    of: add vendor prefix for SMSC
    of: remove /proc/device-tree
    of/selftest: Add self tests for manipulation of properties
    of: Make device nodes kobjects so they show up in sysfs
    arm: add support for reserved memory defined by device tree
    drivers: of: add support for custom reserved memory drivers
    drivers: of: add initialization code for dynamic reserved memory
    drivers: of: add initialization code for static reserved memory
    of: document bindings for reserved-memory nodes
    Revert "of: fix of_update_property()"
    kbuild: dtbs_install: new make target
    ARM: mvebu: Allows to get the SoC ID even without PCI enabled
    of: Allows to use the PCI translator without the PCI core
    ...

    Linus Torvalds
     
  • Commit 74397174989e5f70 attempted to clean up the power management options
    for arm64, but when things were merged it didn't fully take effect. Fix
    it again.

    Signed-off-by: Josh Boyer
    Signed-off-by: Linus Torvalds

    Josh Boyer
     

02 Apr, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "The majority of this material spent some time in linux-next, some of
    it even several weeks. There are a few relatively fresh commits in
    it, but they are mostly fixes and simple cleanups.

    ACPI took the lead this time, both in terms of the number of commits
    and the number of modified lines of code, cpufreq follows and there
    are a few changes in the PM core and in cpuidle too.

    A new feature that already got some LWN.net's attention is the device
    PM QoS extension allowing latency tolerance requirements to be
    propagated from leaf devices to their ancestors with hardware
    interfaces for specifying latency tolerance. That should help systems
    with hardware-driven power management to avoid going too far with it
    in cases when there are latency tolerance constraints.

    There also are some significant changes in the ACPI core related to
    the way in which hotplug notifications are handled. They affect PCI
    hotplug (ACPIPHP) and the ACPI dock station code too. The bottom line
    is that all those notification now go through the root notify handler
    and are propagated to the interested subsystems by means of callbacks
    instead of having to install a notify handler for each device object
    that we can potentially get hotplug notifications for.

    In addition to that ACPICA will now advertise "Windows 2013"
    compatibility for _OSI, because some systems out there don't work
    correctly if that is not done (some of them don't even boot).

    On the system suspend side of things, all of the device suspend and
    resume callbacks, except for ->prepare() and ->complete(), are now
    going to be executed asynchronously as that turns out to speed up
    system suspend and resume on some platforms quite significantly and we
    have a few more optimizations in that area.

    Apart from that, there are some new device IDs and fixes and cleanups
    all over. In particular, the system suspend and resume handling by
    cpufreq should be improved and the cpuidle menu governor should be a
    bit more robust now.

    Specifics:

    - Device PM QoS support for latency tolerance constraints on systems
    with hardware interfaces allowing such constraints to be specified.
    That is necessary to prevent hardware-driven power management from
    becoming overly aggressive on some systems and to prevent power
    management features leading to excessive latencies from being used
    in some cases.

    - Consolidation of the handling of ACPI hotplug notifications for
    device objects. This causes all device hotplug notifications to go
    through the root notify handler (that was executed for all of them
    anyway before) that propagates them to individual subsystems, if
    necessary, by executing callbacks provided by those subsystems
    (those callbacks are associated with struct acpi_device objects
    during device enumeration). As a result, the code in question
    becomes both smaller in size and more straightforward and all of
    those changes should not affect users.

    - ACPICA update, including fixes related to the handling of _PRT in
    cases when it is broken and the addition of "Windows 2013" to the
    list of supported "features" for _OSI (which is necessary to
    support systems that work incorrectly or don't even boot without
    it). Changes from Bob Moore and Lv Zheng.

    - Consolidation of ACPI _OST handling from Jiang Liu.

    - ACPI battery and AC fixes allowing unusual system configurations to
    be handled by that code from Alexander Mezin.

    - New device IDs for the ACPI LPSS driver from Chiau Ee Chew.

    - ACPI fan and thermal optimizations related to system suspend and
    resume from Aaron Lu.

    - Cleanups related to ACPI video from Jean Delvare.

    - Assorted ACPI fixes and cleanups from Al Stone, Hanjun Guo, Lan
    Tianyu, Paul Bolle, Tomasz Nowicki.

    - Intel RAPL (Running Average Power Limits) driver cleanups from
    Jacob Pan.

    - intel_pstate fixes and cleanups from Dirk Brandewie.

    - cpufreq fixes related to system suspend/resume handling from Viresh
    Kumar.

    - cpufreq core fixes and cleanups from Viresh Kumar, Stratos
    Karafotis, Saravana Kannan, Rashika Kheria, Joe Perches.

    - cpufreq drivers updates from Viresh Kumar, Zhuoyu Zhang, Rob
    Herring.

    - cpuidle fixes related to the menu governor from Tuukka Tikkanen.

    - cpuidle fix related to coupled CPUs handling from Paul Burton.

    - Asynchronous execution of all device suspend and resume callbacks,
    except for ->prepare and ->complete, during system suspend and
    resume from Chuansheng Liu.

    - Delayed resuming of runtime-suspended devices during system suspend
    for the PCI bus type and ACPI PM domain.

    - New set of PM helper routines to allow device runtime PM callbacks
    to be used during system suspend and resume more easily from Ulf
    Hansson.

    - Assorted fixes and cleanups in the PM core from Geert Uytterhoeven,
    Prabhakar Lad, Philipp Zabel, Rashika Kheria, Sebastian Capella.

    - devfreq fix from Saravana Kannan"

    * tag 'pm+acpi-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits)
    PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs
    PM / sleep: Correct whitespace errors in
    intel_pstate: Set core to min P state during core offline
    cpufreq: Add stop CPU callback to cpufreq_driver interface
    cpufreq: Remove unnecessary braces
    cpufreq: Fix checkpatch errors and warnings
    cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs
    MAINTAINERS: Reorder maintainer addresses for PM and ACPI
    PM / Runtime: Update runtime_idle() documentation for return value meaning
    video / output: Drop display output class support
    fujitsu-laptop: Drop unneeded include
    acer-wmi: Stop selecting VIDEO_OUTPUT_CONTROL
    ACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL
    ACPI / video: fix ACPI_VIDEO dependencies
    cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE}
    cpufreq: Do not allow ->setpolicy drivers to provide ->target
    cpufreq: arm_big_little: set 'physical_cluster' for each CPU
    cpufreq: arm_big_little: make vexpress driver depend on bL core driver
    ACPI / button: Add ACPI Button event via netlink routine
    ACPI: Remove duplicate definitions of PREFIX
    ...

    Linus Torvalds
     

01 Apr, 2014

5 commits

  • Pull libata updates from Tejun Heo:
    "A lot of activities on libata side this time.

    - A lot of changes around ahci. Various embedded platforms are
    implementing ahci controllers. Some were built atop ahci_platform,
    others were doing their own things. Hans made some structural
    changes to libahci and librarized ahci_platform so that ahci
    platform drivers can share more common code. A couple platform
    drivers are added on top of that and several are added to replace
    older drivers which were doing their own things (older ones are
    scheduled to be removed).

    - Dan finishes the patchset to make libata PM operations
    asynchronous. Combined with one patch being routed through scsi,
    this should speed resume measurably.

    - Various fixes and cleanups from Bartlomiej and others"

    * 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (61 commits)
    ata: fix Marvell SATA driver dependencies
    ata: fix ARASAN CompactFlash PATA driver dependencies
    ata: remove superfluous casts
    ata: sata_highbank: remove superfluous cast
    ata: fix Calxeda Highbank SATA driver dependencies
    ata: fix R-Car SATA driver dependencies
    ARM: davinci: da850: update SATA AHCI support
    ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controller
    ata: move library code from ahci_platform.c to libahci_platform.c
    ata: ahci_platform: fix ahci_platform_data->suspend method handling
    libata: remove unused ata_sas_port_async_resume() stub
    libata.h: add stub for ata_sas_port_resume
    libata: async resume
    libata, libsas: kill pm_result and related cleanup
    ata: Fix compiler warning with APM X-Gene host controller driver
    arm64: Add APM X-Gene SoC AHCI SATA host controller DTS entries
    ata: Add APM X-Gene SoC AHCI SATA host controller driver
    Documentation: Add documentation for the APM X-Gene SoC SATA host controller DTS binding
    arm64: Add APM X-Gene SoC 15Gbps Multi-purpose PHY DTS entries
    ata: ahci_sunxi: fix code formatting
    ...

    Linus Torvalds
     
  • Pull ARM64 updates from Catalin Marinas:
    - KGDB support for arm64
    - PCI I/O space extended to 16M (in preparation of PCIe support
    patches)
    - Dropping ZONE_DMA32 in favour of ZONE_DMA (we only need one for the
    time being), together with swiotlb late initialisation to correctly
    setup the bounce buffer
    - DMA API cache maintenance support (not all ARMv8 platforms have
    hardware cache coherency)
    - Crypto extensions advertising via ELF_HWCAP2 for compat user space
    - Perf support for dwarf unwinding in compat mode
    - asm/tlb.h converted to the generic mmu_gather code
    - asm-generic rwsem implementation
    - Code clean-up

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (42 commits)
    arm64: Remove pgprot_dmacoherent()
    arm64: Support DMA_ATTR_WRITE_COMBINE
    arm64: Implement custom mmap functions for dma mapping
    arm64: Fix __range_ok macro
    arm64: Fix duplicated Kconfig entries
    arm64: mm: Route pmd thp functions through pte equivalents
    arm64: rwsem: use asm-generic rwsem implementation
    asm-generic: rwsem: de-PPCify rwsem.h
    arm64: enable generic CPU feature modalias matching for this architecture
    arm64: smp: make local symbol static
    arm64: debug: make local symbols static
    ARM64: perf: support dwarf unwinding in compat mode
    ARM64: perf: add support for frame pointer unwinding in compat mode
    ARM64: perf: add support for perf registers API
    arm64: Add boot time configuration of Intermediate Physical Address size
    arm64: Do not synchronise I and D caches for special ptes
    arm64: Make DMA coherent and strongly ordered mappings not executable
    arm64: barriers: add dmb barrier
    arm64: topology: Implement basic CPU topology support
    arm64: advertise ARMv8 extensions to 32-bit compat ELF binaries
    ...

    Linus Torvalds
     
  • Pull s390 compat wrapper rework from Heiko Carstens:
    "S390 compat system call wrapper simplification work.

    The intention of this work is to get rid of all hand written assembly
    compat system call wrappers on s390, which perform proper sign or zero
    extension, or pointer conversion of compat system call parameters.
    Instead all of this should be done with C code eg by using Al's
    COMPAT_SYSCALL_DEFINEx() macro.

    Therefore all common code and s390 specific compat system calls have
    been converted to the COMPAT_SYSCALL_DEFINEx() macro.

    In order to generate correct code all compat system calls may only
    have eg compat_ulong_t parameters, but no unsigned long parameters.
    Those patches which change parameter types from unsigned long to
    compat_ulong_t parameters are separate in this series, but shouldn't
    cause any harm.

    The only compat system calls which intentionally have 64 bit
    parameters (preadv64 and pwritev64) in support of the x86/32 ABI
    haven't been changed, but are now only available if an architecture
    defines __ARCH_WANT_COMPAT_SYS_PREADV64/PWRITEV64.

    System calls which do not have a compat variant but still need proper
    zero extension on s390, like eg "long sys_brk(unsigned long brk)" will
    get a proper wrapper function with the new s390 specific
    COMPAT_SYSCALL_WRAPx() macro:

    COMPAT_SYSCALL_WRAP1(brk, unsigned long, brk);

    which generates the following code (simplified):

    asmlinkage long sys_brk(unsigned long brk);
    asmlinkage long compat_sys_brk(long brk)
    {
    return sys_brk((u32)brk);
    }

    Given that the C file which contains all the COMPAT_SYSCALL_WRAP lines
    includes both linux/syscall.h and linux/compat.h, it will generate
    build errors, if the declaration of sys_brk() doesn't match, or if
    there exists a non-matching compat_sys_brk() declaration.

    In addition this will intentionally result in a link error if
    somewhere else a compat_sys_brk() function exists, which probably
    should have been used instead. Two more BUILD_BUG_ONs make sure the
    size and type of each compat syscall parameter can be handled
    correctly with the s390 specific macros.

    I converted the compat system calls step by step to verify the
    generated code is correct and matches the previous code. In fact it
    did not always match, however that was always a bug in the hand
    written asm code.

    In result we get less code, less bugs, and much more sanity checking"

    * 'compat' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (44 commits)
    s390/compat: add copyright statement
    compat: include linux/unistd.h within linux/compat.h
    s390/compat: get rid of compat wrapper assembly code
    s390/compat: build error for large compat syscall args
    mm/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
    kexec/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
    net/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
    ipc/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
    fs/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
    ipc/compat: convert to COMPAT_SYSCALL_DEFINE
    fs/compat: convert to COMPAT_SYSCALL_DEFINE
    security/compat: convert to COMPAT_SYSCALL_DEFINE
    mm/compat: convert to COMPAT_SYSCALL_DEFINE
    net/compat: convert to COMPAT_SYSCALL_DEFINE
    kernel/compat: convert to COMPAT_SYSCALL_DEFINE
    fs/compat: optional preadv64/pwrite64 compat system calls
    ipc/compat_sys_msgrcv: change msgtyp type from long to compat_long_t
    s390/compat: partial parameter conversion within syscall wrappers
    s390/compat: automatic zero, sign and pointer conversion of syscalls
    s390/compat: add sync_file_range and fallocate compat syscalls
    ...

    Linus Torvalds
     
  • Pull scheduler changes from Ingo Molnar:
    "Bigger changes:

    - sched/idle restructuring: they are WIP preparation for deeper
    integration between the scheduler and idle state selection, by
    Nicolas Pitre.

    - add NUMA scheduling pseudo-interleaving, by Rik van Riel.

    - optimize cgroup context switches, by Peter Zijlstra.

    - RT scheduling enhancements, by Thomas Gleixner.

    The rest is smaller changes, non-urgnt fixes and cleanups"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (68 commits)
    sched: Clean up the task_hot() function
    sched: Remove double calculation in fix_small_imbalance()
    sched: Fix broken setscheduler()
    sparc64, sched: Remove unused sparc64_multi_core
    sched: Remove unused mc_capable() and smt_capable()
    sched/numa: Move task_numa_free() to __put_task_struct()
    sched/fair: Fix endless loop in idle_balance()
    sched/core: Fix endless loop in pick_next_task()
    sched/fair: Push down check for high priority class task into idle_balance()
    sched/rt: Fix picking RT and DL tasks from empty queue
    trace: Replace hardcoding of 19 with MAX_NICE
    sched: Guarantee task priority in pick_next_task()
    sched/idle: Remove stale old file
    sched: Put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED
    cpuidle/arm64: Remove redundant cpuidle_idle_call()
    cpuidle/powernv: Remove redundant cpuidle_idle_call()
    sched, nohz: Exclude isolated cores from load balancing
    sched: Fix select_task_rq_fair() description comments
    workqueue: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE
    sys: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE
    ...

    Linus Torvalds
     
  • Pull core locking updates from Ingo Molnar:
    "The biggest change is the MCS spinlock generalization changes from Tim
    Chen, Peter Zijlstra, Jason Low et al. There's also lockdep
    fixes/enhancements from Oleg Nesterov, in particular a false negative
    fix related to lockdep_set_novalidate_class() usage"

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
    locking/mutex: Fix debug checks
    locking/mutexes: Add extra reschedule point
    locking/mutexes: Introduce cancelable MCS lock for adaptive spinning
    locking/mutexes: Unlock the mutex without the wait_lock
    locking/mutexes: Modify the way optimistic spinners are queued
    locking/mutexes: Return false if task need_resched() in mutex_can_spin_on_owner()
    locking: Move mcs_spinlock.h into kernel/locking/
    m68k: Skip futex_atomic_cmpxchg_inatomic() test
    futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test
    Revert "sched/wait: Suppress Sparse 'variable shadowing' warning"
    lockdep: Change lockdep_set_novalidate_class() to use _and_name
    lockdep: Change mark_held_locks() to check hlock->check instead of lockdep_no_validate
    lockdep: Don't create the wrong dependency on hlock->check == 0
    lockdep: Make held_lock->check and "int check" argument bool
    locking/mcs: Allow architecture specific asm files to be used for contended case
    locking/mcs: Order the header files in Kbuild of each architecture in alphabetical order
    sched/wait: Suppress Sparse 'variable shadowing' warning
    hung_task/Documentation: Fix hung_task_warnings description
    locking/mcs: Allow architectures to hook in to contended paths
    locking/mcs: Micro-optimize the MCS code, add extra comments
    ...

    Linus Torvalds
     

24 Mar, 2014

3 commits

  • Since this macro is identical to pgprot_writecombine() and is only used
    in a single place, remove it completely to avoid confusion. On ARMv7+
    processors, the coherent DMA mapping must be Normal NonCacheable (a.k.a.
    writecombine) to avoid mismatched hardware attribute aliases (with the
    kernel linear mapping as Normal Cacheable).

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • DMA_ATTR_WRITE_COMBINE is currently ignored. Set the pgprot
    appropriately for non coherent opperations.

    Signed-off-by: Laura Abbott
    Signed-off-by: Catalin Marinas

    Laura Abbott
     
  • The current dma_ops do not specify an mmap function so maping
    falls back to the default implementation. There are at least
    two issues with using the default implementation:

    1) The pgprot is always pgprot_noncached (strongly ordered)
    memory even with coherent operations
    2) dma_common_mmap calls virt_to_page on the remapped non-coherent
    address which leads to invalid memory being mapped.

    Fix both these issue by implementing a custom mmap function which
    correctly accounts for remapped addresses and sets vm_pg_prot
    appropriately.

    Signed-off-by: Laura Abbott
    [catalin.marinas@arm.com: replaced "arm64_" with "__" prefix for consistency]
    Signed-off-by: Catalin Marinas

    Laura Abbott
     

21 Mar, 2014

1 commit

  • Without this, the following scenario is incorrectly determined
    to be invalid.

    addr 0x7f_ffffe000 size 8192 addr_limit 0x80_00000000

    This behavior was observed while trying to vmsplice the stack
    as part of a CRIU dump of a process on a system started with the
    norandmaps kernel parameter.

    Signed-off-by: Christopher Covington
    Signed-off-by: Catalin Marinas

    Christopher Covington
     

20 Mar, 2014

2 commits

  • Subsystems that want to register CPU hotplug callbacks, as well as perform
    initialization for the CPUs that are already online, often do it as shown
    below:

    get_online_cpus();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    register_cpu_notifier(&foobar_cpu_notifier);

    put_online_cpus();

    This is wrong, since it is prone to ABBA deadlocks involving the
    cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
    with CPU hotplug operations).

    Instead, the correct and race-free way of performing the callback
    registration is:

    cpu_notifier_register_begin();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    /* Note the use of the double underscored version of the API */
    __register_cpu_notifier(&foobar_cpu_notifier);

    cpu_notifier_register_done();

    Fix the debug-monitors code in arm64 by using this latter form of callback
    registration.

    Cc: Catalin Marinas
    Cc: Russell King
    Cc: Ingo Molnar
    Acked-by: Will Deacon
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     
  • Subsystems that want to register CPU hotplug callbacks, as well as perform
    initialization for the CPUs that are already online, often do it as shown
    below:

    get_online_cpus();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    register_cpu_notifier(&foobar_cpu_notifier);

    put_online_cpus();

    This is wrong, since it is prone to ABBA deadlocks involving the
    cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
    with CPU hotplug operations).

    Instead, the correct and race-free way of performing the callback
    registration is:

    cpu_notifier_register_begin();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    /* Note the use of the double underscored version of the API */
    __register_cpu_notifier(&foobar_cpu_notifier);

    cpu_notifier_register_done();

    Fix the hw-breakpoint code in arm64 by using this latter form of callback
    registration.

    Cc: Catalin Marinas
    Cc: Lorenzo Pieralisi
    Cc: Ingo Molnar
    Acked-by: Will Deacon
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     

19 Mar, 2014

1 commit

  • Probably due to rebasing over the lengthy time it took to get the patch
    merged commit addea9ef055b (cpufreq: enable ARM drivers on arm64) added
    a duplicate Power management options section. Add CPUfreq to the CPU
    power management section and remove a duplicate include of the main
    power section.

    Signed-off-by: Mark Brown
    Signed-off-by: Catalin Marinas

    Mark Brown
     

18 Mar, 2014

2 commits


15 Mar, 2014

3 commits

  • Rather than have separate hugetlb and transparent huge page pmd
    manipulation functions, re-wire our thp functions to simply call the
    pte equivalents.

    This allows THP to take advantage of the new PTE_WRITE logic introduced
    in:
    c2c93e5 arm64: mm: Introduce PTE_WRITE

    To represent splitting THPs we use the PTE_SPECIAL bit as this is not
    used for pmds.

    Signed-off-by: Steve Capper
    Signed-off-by: Catalin Marinas

    Steve Capper
     
  • asm-generic offers an atomic-add based rwsem implementation, which
    can avoid the need for heavier, spinlock-based synchronisation on the
    fast path.

    This patch makes use of the optimised implementation for arm64 CPUs.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • This enables support for the generic CPU feature modalias implementation that
    wires up optional CPU features to udev based module autoprobing.

    A file is provided that maps CPU feature numbers to
    elf_hwcap bits, which is the standard way on arm64 to advertise optional CPU
    features both internally and to user space.

    Signed-off-by: Ard Biesheuvel
    [catalin.marinas@arm.com: removed unnecessary "!!"]
    Signed-off-by: Catalin Marinas

    Ard Biesheuvel