1. 07 6月, 2014 3 次提交
    • J
      mm: vmscan: clear kswapd's special reclaim powers before exiting · 71abdc15
      Johannes Weiner 提交于
      When kswapd exits, it can end up taking locks that were previously held
      by allocating tasks while they waited for reclaim.  Lockdep currently
      warns about this:
      
      On Wed, May 28, 2014 at 06:06:34PM +0800, Gu Zheng wrote:
      >  inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage.
      >  kswapd2/1151 [HC0[0]:SC0[0]:HE1:SE1] takes:
      >   (&sig->group_rwsem){+++++?}, at: exit_signals+0x24/0x130
      >  {RECLAIM_FS-ON-W} state was registered at:
      >     mark_held_locks+0xb9/0x140
      >     lockdep_trace_alloc+0x7a/0xe0
      >     kmem_cache_alloc_trace+0x37/0x240
      >     flex_array_alloc+0x99/0x1a0
      >     cgroup_attach_task+0x63/0x430
      >     attach_task_by_pid+0x210/0x280
      >     cgroup_procs_write+0x16/0x20
      >     cgroup_file_write+0x120/0x2c0
      >     vfs_write+0xc0/0x1f0
      >     SyS_write+0x4c/0xa0
      >     tracesys+0xdd/0xe2
      >  irq event stamp: 49
      >  hardirqs last  enabled at (49):  _raw_spin_unlock_irqrestore+0x36/0x70
      >  hardirqs last disabled at (48):  _raw_spin_lock_irqsave+0x2b/0xa0
      >  softirqs last  enabled at (0):  copy_process.part.24+0x627/0x15f0
      >  softirqs last disabled at (0):            (null)
      >
      >  other info that might help us debug this:
      >   Possible unsafe locking scenario:
      >
      >         CPU0
      >         ----
      >    lock(&sig->group_rwsem);
      >    <Interrupt>
      >      lock(&sig->group_rwsem);
      >
      >   *** DEADLOCK ***
      >
      >  no locks held by kswapd2/1151.
      >
      >  stack backtrace:
      >  CPU: 30 PID: 1151 Comm: kswapd2 Not tainted 3.10.39+ #4
      >  Call Trace:
      >    dump_stack+0x19/0x1b
      >    print_usage_bug+0x1f7/0x208
      >    mark_lock+0x21d/0x2a0
      >    __lock_acquire+0x52a/0xb60
      >    lock_acquire+0xa2/0x140
      >    down_read+0x51/0xa0
      >    exit_signals+0x24/0x130
      >    do_exit+0xb5/0xa50
      >    kthread+0xdb/0x100
      >    ret_from_fork+0x7c/0xb0
      
      This is because the kswapd thread is still marked as a reclaimer at the
      time of exit.  But because it is exiting, nobody is actually waiting on
      it to make reclaim progress anymore, and it's nothing but a regular
      thread at this point.  Be tidy and strip it of all its powers
      (PF_MEMALLOC, PF_SWAPWRITE, PF_KSWAPD, and the lockdep reclaim state)
      before returning from the thread function.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reported-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      71abdc15
    • L
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into next · cc07aabc
      Linus Torvalds 提交于
      Pull arm64 updates from Catalin Marinas:
       - Optimised assembly string/memory routines (based on the AArch64
         Cortex Strings library contributed to glibc but re-licensed under
         GPLv2)
       - Optimised crypto algorithms making use of the ARMv8 crypto extensions
         (together with kernel API for using FPSIMD instructions in interrupt
         context)
       - Ftrace support
       - CPU topology parsing from DT
       - ESR_EL1 (Exception Syndrome Register) exposed to user space signal
         handlers for SIGSEGV/SIGBUS (useful to emulation tools like Qemu)
       - 1GB section linear mapping if applicable
       - Barriers usage clean-up
       - Default pgprot clean-up
      
      Conflicts as per Catalin.
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (57 commits)
        arm64: kernel: initialize broadcast hrtimer based clock event device
        arm64: ftrace: Add system call tracepoint
        arm64: ftrace: Add CALLER_ADDRx macros
        arm64: ftrace: Add dynamic ftrace support
        arm64: Add ftrace support
        ftrace: Add arm64 support to recordmcount
        arm64: Add 'notrace' attribute to unwind_frame() for ftrace
        arm64: add __ASSEMBLY__ in asm/insn.h
        arm64: Fix linker script entry point
        arm64: lib: Implement optimized string length routines
        arm64: lib: Implement optimized string compare routines
        arm64: lib: Implement optimized memcmp routine
        arm64: lib: Implement optimized memset routine
        arm64: lib: Implement optimized memmove routine
        arm64: lib: Implement optimized memcpy routine
        arm64: defconfig: enable a few more common/useful options in defconfig
        ftrace: Make CALLER_ADDRx macros more generic
        arm64: Fix deadlock scenario with smp_send_stop()
        arm64: Fix machine_shutdown() definition
        arm64: Support arch_irq_work_raise() via self IPIs
        ...
      cc07aabc
    • L
      Fix ARM merge mistake in mvebu board file · 9e47aaef
      Linus Torvalds 提交于
      Russell King points out that my ARM merge (commit eb3d3ec5) was
      broken wrt the arch/arm/mach-mvebu/board-v7.c file, leaving in a stale
      l2x0_of_init() call (it's now handled by the DT description).
      
      Which is kind of embarrassing, since I knew about it as it wasn't the
      only file that had similar merge issues.  At least I got the other ones
      right.
      Reported-by: NRussell King <rmk@arm.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9e47aaef
  2. 06 6月, 2014 3 次提交
    • L
      Merge tag 'microblaze-3.16-rc1' of git://git.monstr.eu/linux-2.6-microblaze into next · 2b03adc1
      Linus Torvalds 提交于
      Pull Microblaze updates from Michal Simek:
       - cleanup PCI and DMA handling
       - use generic device.h
       - some cleanups
      
      * tag 'microblaze-3.16-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Fix typo in head.S s/substract/subtract/
        microblaze: remove check for CONFIG_XILINX_CONSOLE
        microblaze: Use generic device.h
        microblaze: Do not setup empty unmap_sg function
        microblaze: Remove device_to_mask
        microblaze: Clean device dma_ops structure
        microblaze: Cleanup PCI_DRAM_OFFSET handling
        microblaze: Do not setup pci_dma_ops
        microblaze: Return default dma operations
        microblaze: Enable SERIAL_OF_PLATFORM
      2b03adc1
    • L
      Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into next · eb3d3ec5
      Linus Torvalds 提交于
      Pull ARM updates from Russell King:
      
       - Major clean-up of the L2 cache support code.  The existing mess was
         becoming rather unmaintainable through all the additions that others
         have done over time.  This turns it into a much nicer structure, and
         implements a few performance improvements as well.
      
       - Clean up some of the CP15 control register tweaks for alignment
         support, moving some code and data into alignment.c
      
       - DMA properties for ARM, from Santosh and reviewed by DT people.  This
         adds DT properties to specify bus translations we can't discover
         automatically, and to indicate whether devices are coherent.
      
       - Hibernation support for ARM
      
       - Make ftrace work with read-only text in modules
      
       - add suspend support for PJ4B CPUs
      
       - rework interrupt masking for undefined instruction handling, which
         allows us to enable interrupts earlier in the handling of these
         exceptions.
      
       - support for big endian page tables
      
       - fix stacktrace support to exclude stacktrace functions from the
         trace, and add save_stack_trace_regs() implementation so that kprobes
         can record stack traces.
      
       - Add support for the Cortex-A17 CPU.
      
       - Remove last vestiges of ARM710 support.
      
       - Removal of ARM "meminfo" structure, finally converting us solely to
         memblock to handle the early memory initialisation.
      
      * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (142 commits)
        ARM: ensure C page table setup code follows assembly code (part II)
        ARM: ensure C page table setup code follows assembly code
        ARM: consolidate last remaining open-coded alignment trap enable
        ARM: remove global cr_no_alignment
        ARM: remove CPU_CP15 conditional from alignment.c
        ARM: remove unused adjust_cr() function
        ARM: move "noalign" command line option to alignment.c
        ARM: provide common method to clear bits in CPU control register
        ARM: 8025/1: Get rid of meminfo
        ARM: 8060/1: mm: allow sub-architectures to override PCI I/O memory type
        ARM: 8066/1: correction for ARM patch 8031/2
        ARM: 8049/1: ftrace/add save_stack_trace_regs() implementation
        ARM: 8065/1: remove last use of CONFIG_CPU_ARM710
        ARM: 8062/1: Modify ldrt fixup handler to re-execute the userspace instruction
        ARM: 8047/1: rwsem: use asm-generic rwsem implementation
        ARM: l2c: trial at enabling some Cortex-A9 optimisations
        ARM: l2c: add warnings for stuff modifying aux_ctrl register values
        ARM: l2c: print a warning with L2C-310 caches if the cache size is modified
        ARM: l2c: remove old .set_debug method
        ARM: l2c: kill L2X0_AUX_CTRL_MASK before anyone else makes use of this
        ...
      eb3d3ec5
    • L
      Merge branch 'arm64-efi-for-linus' of... · c3c55a07
      Linus Torvalds 提交于
      Merge branch 'arm64-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
      
      Pull ARM64 EFI update from Peter Anvin:
       "By agreement with the ARM64 EFI maintainers, we have agreed to make
        -tip the upstream for all EFI patches.  That is why this patchset
        comes from me :)
      
        This patchset enables EFI stub support for ARM64, like we already have
        on x86"
      
      * 'arm64-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        arm64: efi: only attempt efi map setup if booting via EFI
        efi/arm64: ignore dtb= when UEFI SecureBoot is enabled
        doc: arm64: add description of EFI stub support
        arm64: efi: add EFI stub
        doc: arm: add UEFI support documentation
        arm64: add EFI runtime services
        efi: Add shared FDT related functions for ARM/ARM64
        arm64: Add function to create identity mappings
        efi: add helper function to get UEFI params from FDT
        doc: efi-stub.txt updates for ARM
        lib: add fdt_empty_tree.c
      c3c55a07
  3. 05 6月, 2014 34 次提交