1. 08 4月, 2014 1 次提交
    • R
      ARM: add missing system_misc.h include to process.c · 779dd959
      Russell King 提交于
      arm_pm_restart(), arm_pm_idle() and soft_restart() are all declared in
      system_misc.h, but this file is not included in process.c.  Add this
      missing include.  Found via sparse:
      
      arch/arm/kernel/process.c:98:6: warning: symbol 'soft_restart' was not declared. Should it be static?
      arch/arm/kernel/process.c:127:6: warning: symbol 'arm_pm_restart' was not declared. Should it be static?
      arch/arm/kernel/process.c:134:6: warning: symbol 'arm_pm_idle' was not declared. Should it be static?
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      779dd959
  2. 07 4月, 2014 1 次提交
  3. 04 2月, 2014 1 次提交
  4. 10 12月, 2013 1 次提交
  5. 07 8月, 2013 1 次提交
  6. 03 8月, 2013 1 次提交
    • R
      ARM: fix a cockup in 48be69a0 (ARM: move signal handlers into a vdso-like page) · e0d40756
      Russell King 提交于
      Unfortunately, I never committed the fix to a nasty oops which can
      occur as a result of that commit:
      
      ------------[ cut here ]------------
      kernel BUG at /home/olof/work/batch/include/linux/mm.h:414!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 490 Comm: killall5 Not tainted 3.11.0-rc3-00288-gabe03080 #53
      task: e90acac0 ti: e9be8000 task.ti: e9be8000
      PC is at special_mapping_fault+0xa4/0xc4
      LR is at __do_fault+0x68/0x48c
      
      This doesn't show up unless you do quite a bit of testing; a simple
      boot test does not do this, so all my nightly tests were passing fine.
      
      The reason for this is that install_special_mapping() expects the
      page array to stick around, and as this was only inserting one page
      which was stored on the kernel stack, that's why this was blowing up.
      Reported-by: NOlof Johansson <olof@lixom.net>
      Tested-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e0d40756
  7. 01 8月, 2013 3 次提交
  8. 10 7月, 2013 3 次提交
  9. 24 6月, 2013 1 次提交
  10. 18 6月, 2013 1 次提交
    • S
      ARM: 7759/1: decouple CPU offlining from reboot/shutdown · 19ab428f
      Stephen Warren 提交于
      Add comments to machine_shutdown()/halt()/power_off()/restart() that
      describe their purpose and/or requirements re: CPUs being active/not.
      
      In machine_shutdown(), replace the call to smp_send_stop() with a call to
      disable_nonboot_cpus(). This completely disables all but one CPU, thus
      satisfying the requirement that only a single CPU be active for kexec.
      Adjust Kconfig dependencies for this change.
      
      In machine_halt()/power_off()/restart(), call smp_send_stop() directly,
      rather than via machine_shutdown(); these functions don't need to
      completely de-activate all CPUs using hotplug, but rather just quiesce
      them.
      
      Remove smp_kill_cpus(), and its call from smp_send_stop().
      smp_kill_cpus() was indirectly calling smp_ops.cpu_kill() without calling
      smp_ops.cpu_die() on the target CPUs first. At least some implementations
      of smp_ops had issues with this; it caused cpu_kill() to hang on Tegra,
      for example. Since smp_send_stop() is only used for shutdown, halt, and
      power-off, there is no need to attempt any kind of CPU hotplug here.
      
      Adjust Kconfig to reflect that machine_shutdown() (and hence kexec)
      relies upon disable_nonboot_cpus(). However, this alone doesn't guarantee
      that hotplug will work, or even that hotplug is implemented for a
      particular piece of HW that a multi-platform zImage runs on. Hence, add
      error-checking to machine_kexec() to determine whether it did work.
      Suggested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NZhangfei Gao <zhangfei.gao@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      19ab428f
  11. 23 5月, 2013 1 次提交
    • S
      ARM: 7727/1: remove the .vm_mm value from gate_vma · 4ca46c5e
      Steven Capper 提交于
      If one reads /proc/$PID/smaps, the mmap_sem belonging to the
      address space of the task being examined is locked for reading.
      All the pages of the vmas belonging to the task's address space
      are then walked with this lock held.
      
      If a gate_vma is present in the architecture, it too is examined
      by the fs/proc/task_mmu.c code. As gate_vma doesn't belong to the
      address space of the task though, its pages are not walked.
      
      A recent cleanup (commit f6604efe) of the gate_vma initialisation
      code set the vm_mm value to &init_mm. Unfortunately a non-NULL
      vm_mm value in the gate_vma will cause the task_mmu code to attempt
      to walk the pages of the gate_vma (with no mmap-sem lock held). If
      one enables Transparent Huge Page support and vm debugging, this
      will then cause OOPses as pmd_trans_huge_lock is called without
      mmap_sem being locked.
      
      This patch removes the .vm_mm value from gate_vma, restoring the
      original behaviour of the task_mmu code.
      Signed-off-by: NSteve Capper <steve.capper@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4ca46c5e
  12. 01 5月, 2013 1 次提交
    • T
      dump_stack: unify debug information printed by show_regs() · a43cb95d
      Tejun Heo 提交于
      show_regs() is inherently arch-dependent but it does make sense to print
      generic debug information and some archs already do albeit in slightly
      different forms.  This patch introduces a generic function to print debug
      information from show_regs() so that different archs print out the same
      information and it's much easier to modify what's printed.
      
      show_regs_print_info() prints out the same debug info as dump_stack()
      does plus task and thread_info pointers.
      
      * Archs which didn't print debug info now do.
      
        alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
        metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
        um, xtensa
      
      * Already prints debug info.  Replaced with show_regs_print_info().
        The printed information is superset of what used to be there.
      
        arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86
      
      * s390 is special in that it used to print arch-specific information
        along with generic debug info.  Heiko and Martin think that the
        arch-specific extra isn't worth keeping s390 specfic implementation.
        Converted to use the generic version.
      
      Note that now all archs print the debug info before actual register
      dumps.
      
      An example BUG() dump follows.
      
       kernel BUG at /work/os/work/kernel/workqueue.c:4841!
       invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
       Hardware name: empty empty/S3992, BIOS 080011  10/26/2007
       task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
       RIP: 0010:[<ffffffff8234a07e>]  [<ffffffff8234a07e>] init_workqueues+0x4/0x6
       RSP: 0000:ffff88007c861ec8  EFLAGS: 00010246
       RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
       RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
       RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
       R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
       R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
       FS:  0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
       CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
       Stack:
        ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
        0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
        ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
       Call Trace:
        [<ffffffff81000312>] do_one_initcall+0x122/0x170
        [<ffffffff82335e5d>] kernel_init_freeable+0x9b/0x1c8
        [<ffffffff81c47760>] ? rest_init+0x140/0x140
        [<ffffffff81c4776e>] kernel_init+0xe/0xf0
        [<ffffffff81c6be9c>] ret_from_fork+0x7c/0xb0
        [<ffffffff81c47760>] ? rest_init+0x140/0x140
        ...
      
      v2: Typo fix in x86-32.
      
      v3: CPU number dropped from show_regs_print_info() as
          dump_stack_print_info() has been updated to print it.  s390
          specific implementation dropped as requested by s390 maintainers.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Acked-by: Chris Metcalf <cmetcalf@tilera.com>		[tile bits]
      Acked-by: Richard Kuo <rkuo@codeaurora.org>		[hexagon bits]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a43cb95d
  13. 08 4月, 2013 2 次提交
  14. 13 3月, 2013 1 次提交
  15. 24 2月, 2013 1 次提交
  16. 18 2月, 2013 1 次提交
  17. 29 11月, 2012 2 次提交
  18. 13 11月, 2012 1 次提交
  19. 18 10月, 2012 1 次提交
    • F
      ARM: 7544/1: Add BUG_ON when hlt counter is wrongly used · 871df85a
      fwu 提交于
      1. On ARM platform, "nohlt" can be used to prevent core from idle
         process, returning immediately.
      2. There are two interfaces, exported for other modules, named
         "disable_hlt" and "enable_hlt" are used to enable/disable the
         cpuidle mechanism by increasing/decreasing "hlt_counter".
         Disable_hlt and enable_hlt are paired operation,
         when you first call disable_hlt and then enable_hlt, the
         semantics are right.
      3. There is no obvious constraint to prevent user(driver/module)
         code to prevent the case that enable_hlt is ahead of disable_hlt,
         which is a fatal operation on kernel state change from user,
         and there is no any WARNING or notification if the case happens
         in current kernel code.
         This patch aims to report BUG when the case happens, just like
         what the kernel do when enable_irq is ahead of disable_irq.
      
      Link: https://patchwork.kernel.org/patch/1527881/Signed-off-by: Nfwu <fwu@marvell.com>
      Signed-off-by: NYiLu Mao <ylmao@marvell.com>
      Signed-off-by: NNing Jiang <ning.jiang@marvell.com>
      Acked-by: Nicolas Pitre
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      871df85a
  20. 13 10月, 2012 1 次提交
  21. 01 10月, 2012 1 次提交
  22. 01 8月, 2012 1 次提交
  23. 31 7月, 2012 1 次提交
  24. 08 5月, 2012 1 次提交
  25. 29 3月, 2012 1 次提交
  26. 24 3月, 2012 2 次提交
    • W
      ARM: 7294/1: vectors: use gate_vma for vectors user mapping · f9d4861f
      Will Deacon 提交于
      The current user mapping for the vectors page is inserted as a `horrible
      hack vma' into each task via arch_setup_additional_pages. This causes
      problems with the MM subsystem and vm_normal_page, as described here:
      
      https://lkml.org/lkml/2012/1/14/55
      
      Following the suggestion from Hugh in the above thread, this patch uses
      the gate_vma for the vectors user mapping, therefore consolidating
      the horrible hack VMAs into one.
      Acked-and-Tested-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f9d4861f
    • J
      coredump: remove VM_ALWAYSDUMP flag · 909af768
      Jason Baron 提交于
      The motivation for this patchset was that I was looking at a way for a
      qemu-kvm process, to exclude the guest memory from its core dump, which
      can be quite large.  There are already a number of filter flags in
      /proc/<pid>/coredump_filter, however, these allow one to specify 'types'
      of kernel memory, not specific address ranges (which is needed in this
      case).
      
      Since there are no more vma flags available, the first patch eliminates
      the need for the 'VM_ALWAYSDUMP' flag.  The flag is used internally by
      the kernel to mark vdso and vsyscall pages.  However, it is simple
      enough to check if a vma covers a vdso or vsyscall page without the need
      for this flag.
      
      The second patch then replaces the 'VM_ALWAYSDUMP' flag with a new
      'VM_NODUMP' flag, which can be set by userspace using new madvise flags:
      'MADV_DONTDUMP', and unset via 'MADV_DODUMP'.  The core dump filters
      continue to work the same as before unless 'MADV_DONTDUMP' is set on the
      region.
      
      The qemu code which implements this features is at:
      
        http://people.redhat.com/~jbaron/qemu-dump/qemu-dump.patch
      
      In my testing the qemu core dump shrunk from 383MB -> 13MB with this
      patch.
      
      I also believe that the 'MADV_DONTDUMP' flag might be useful for
      security sensitive apps, which might want to select which areas are
      dumped.
      
      This patch:
      
      The VM_ALWAYSDUMP flag is currently used by the coredump code to
      indicate that a vma is part of a vsyscall or vdso section.  However, we
      can determine if a vma is in one these sections by checking it against
      the gate_vma and checking for a non-NULL return value from
      arch_vma_name().  Thus, freeing a valuable vma bit.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Acked-by: NRoland McGrath <roland@hack.frob.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Avi Kivity <avi@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      909af768
  27. 01 3月, 2012 1 次提交
  28. 21 1月, 2012 2 次提交
  29. 05 1月, 2012 1 次提交
  30. 13 12月, 2011 1 次提交
    • W
      ARM: reset: implement soft_restart for jumping to a physical address · 290130a1
      Will Deacon 提交于
      Tools such as kexec and CPU hotplug require a way to reset the processor
      and branch to some code in physical space. This requires various bits of
      jiggery pokery with the caches and MMU which, when it goes wrong, tends
      to lock up the system.
      
      This patch fleshes out the soft_restart implementation so that it
      branches to the reset code using the identity mapping. This requires us
      to change to a temporary stack, held within the kernel image as a static
      array, to avoid conflicting with the new view of memory.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      290130a1
  31. 12 12月, 2011 2 次提交
    • F
      nohz: Remove tick_nohz_idle_enter_norcu() / tick_nohz_idle_exit_norcu() · 1268fbc7
      Frederic Weisbecker 提交于
      Those two APIs were provided to optimize the calls of
      tick_nohz_idle_enter() and rcu_idle_enter() into a single
      irq disabled section. This way no interrupt happening in-between would
      needlessly process any RCU job.
      
      Now we are talking about an optimization for which benefits
      have yet to be measured. Let's start simple and completely decouple
      idle rcu and dyntick idle logics to simplify.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      1268fbc7
    • F
      nohz: Allow rcu extended quiescent state handling seperately from tick stop · 2bbb6817
      Frederic Weisbecker 提交于
      It is assumed that rcu won't be used once we switch to tickless
      mode and until we restart the tick. However this is not always
      true, as in x86-64 where we dereference the idle notifiers after
      the tick is stopped.
      
      To prepare for fixing this, add two new APIs:
      tick_nohz_idle_enter_norcu() and tick_nohz_idle_exit_norcu().
      
      If no use of RCU is made in the idle loop between
      tick_nohz_enter_idle() and tick_nohz_exit_idle() calls, the arch
      must instead call the new *_norcu() version such that the arch doesn't
      need to call rcu_idle_enter() and rcu_idle_exit().
      
      Otherwise the arch must call tick_nohz_enter_idle() and
      tick_nohz_exit_idle() and also call explicitly:
      
      - rcu_idle_enter() after its last use of RCU before the CPU is put
      to sleep.
      - rcu_idle_exit() before the first use of RCU after the CPU is woken
      up.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: David Miller <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      2bbb6817