~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-msm/hotplug.c

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  Copyright (C) 2002 ARM Ltd.
  3  *  All Rights Reserved
  4  *
  5  * This program is free software; you can redistribute it and/or modify
  6  * it under the terms of the GNU General Public License version 2 as
  7  * published by the Free Software Foundation.
  8  */
  9 #include <linux/kernel.h>
 10 #include <linux/errno.h>
 11 #include <linux/smp.h>
 12 
 13 #include <asm/smp_plat.h>
 14 
 15 #include "common.h"
 16 
 17 static inline void cpu_enter_lowpower(void)
 18 {
 19 }
 20 
 21 static inline void cpu_leave_lowpower(void)
 22 {
 23 }
 24 
 25 static inline void platform_do_lowpower(unsigned int cpu)
 26 {
 27         /* Just enter wfi for now. TODO: Properly shut off the cpu. */
 28         for (;;) {
 29                 /*
 30                  * here's the WFI
 31                  */
 32                 asm("wfi"
 33                     :
 34                     :
 35                     : "memory", "cc");
 36 
 37                 if (pen_release == cpu_logical_map(cpu)) {
 38                         /*
 39                          * OK, proper wakeup, we're done
 40                          */
 41                         break;
 42                 }
 43 
 44                 /*
 45                  * getting here, means that we have come out of WFI without
 46                  * having been woken up - this shouldn't happen
 47                  *
 48                  * The trouble is, letting people know about this is not really
 49                  * possible, since we are currently running incoherently, and
 50                  * therefore cannot safely call printk() or anything else
 51                  */
 52                 pr_debug("CPU%u: spurious wakeup call\n", cpu);
 53         }
 54 }
 55 
 56 /*
 57  * platform-specific code to shutdown a CPU
 58  *
 59  * Called with IRQs disabled
 60  */
 61 void __ref msm_cpu_die(unsigned int cpu)
 62 {
 63         /*
 64          * we're ready for shutdown now, so do it
 65          */
 66         cpu_enter_lowpower();
 67         platform_do_lowpower(cpu);
 68 
 69         /*
 70          * bring this CPU back into the world of cache
 71          * coherency, and then restore interrupts
 72          */
 73         cpu_leave_lowpower();
 74 }
 75 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp