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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  *  Copyright (C) 2002 ARM Ltd.
  4  *  All Rights Reserved
  5  *  Copyright (c) 2010, 2012-2013, NVIDIA Corporation. All rights reserved.
  6  */
  7 
  8 #include <linux/clk/tegra.h>
  9 #include <linux/kernel.h>
 10 #include <linux/smp.h>
 11 
 12 #include <soc/tegra/common.h>
 13 #include <soc/tegra/fuse.h>
 14 
 15 #include <asm/smp_plat.h>
 16 
 17 #include "common.h"
 18 #include "sleep.h"
 19 
 20 static void (*tegra_hotplug_shutdown)(void);
 21 
 22 int tegra_cpu_kill(unsigned cpu)
 23 {
 24         cpu = cpu_logical_map(cpu);
 25 
 26         /* Clock gate the CPU */
 27         tegra_wait_cpu_in_reset(cpu);
 28         tegra_disable_cpu_clock(cpu);
 29 
 30         return 1;
 31 }
 32 
 33 /*
 34  * platform-specific code to shutdown a CPU
 35  *
 36  * Called with IRQs disabled
 37  */
 38 void tegra_cpu_die(unsigned int cpu)
 39 {
 40         if (!tegra_hotplug_shutdown) {
 41                 WARN(1, "hotplug is not yet initialized\n");
 42                 return;
 43         }
 44 
 45         /* Clean L1 data cache */
 46         tegra_disable_clean_inv_dcache(TEGRA_FLUSH_CACHE_LOUIS);
 47 
 48         /* Shut down the current CPU. */
 49         tegra_hotplug_shutdown();
 50 
 51         /* Should never return here. */
 52         BUG();
 53 }
 54 
 55 static int __init tegra_hotplug_init(void)
 56 {
 57         if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
 58                 return 0;
 59 
 60         if (!soc_is_tegra())
 61                 return 0;
 62 
 63         if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_get_chip_id() == TEGRA20)
 64                 tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
 65         if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_get_chip_id() == TEGRA30)
 66                 tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
 67         if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_get_chip_id() == TEGRA114)
 68                 tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
 69         if (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) && tegra_get_chip_id() == TEGRA124)
 70                 tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
 71 
 72         return 0;
 73 }
 74 pure_initcall(tegra_hotplug_init);
 75 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php