1. 31 7月, 2014 1 次提交
  2. 25 4月, 2014 1 次提交
  3. 20 3月, 2014 1 次提交
    • S
      arm64, debug-monitors: Fix CPU hotplug callback registration · 4b0b68af
      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 debug-monitors code in arm64 by using this latter form of callback
      registration.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Ingo Molnar <mingo@kernel.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4b0b68af
  4. 13 3月, 2014 1 次提交
  5. 26 2月, 2014 2 次提交
  6. 20 12月, 2013 1 次提交
  7. 29 11月, 2013 1 次提交
  8. 29 10月, 2013 1 次提交
  9. 15 7月, 2013 1 次提交
    • P
      arm64: delete __cpuinit usage from all users · b8c6453a
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/arm64 uses of the __cpuinit macros from
      all C files.  Currently arm64 does not have any __CPUINIT used in
      assembly files.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      b8c6453a
  10. 12 6月, 2013 1 次提交
  11. 13 5月, 2013 1 次提交
    • W
      arm64: debug: clear mdscr_el1 instead of taking the OS lock · 9c413e25
      Will Deacon 提交于
      During boot, we take the debug OS lock before interrupts are enabled.
      This is required to prevent clearing of PSTATE.D on the interrupt entry
      path, which could result in spurious debug exceptions before we've got
      round to resetting things like the hardware breakpoints registers to a
      sane state.
      
      A problem with this approach is that taking the OS lock prevents an
      external JTAG debugger from debugging the system, which is especially
      irritating during boot, where JTAG debugging can be most useful.
      
      This patch clears mdscr_el1 rather than taking the lock, clearing the
      MDE and KDE bits and preventing self-hosted hardware debug exceptions
      from occurring.
      Tested-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: stable@vger.kernel.org
      9c413e25
  12. 17 9月, 2012 1 次提交