2 * drivers/misc/tegra-profiler/tegra.h
4 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 #ifndef __QUADD_TEGRA_H
18 #define __QUADD_TEGRA_H
20 #include <linux/smp.h>
21 #include <asm/ptrace.h>
23 #ifdef CONFIG_TEGRA_CLUSTER_CONTROL
25 #include <../../mach-tegra/pm.h>
28 static inline int quadd_get_processor_id(struct pt_regs *regs)
30 int cpu_id = smp_processor_id();
32 #ifdef CONFIG_TEGRA_CLUSTER_CONTROL
34 cpu_id |= QUADD_CPUMODE_TEGRA_POWER_CLUSTER_LP;
38 cpu_id |= QUADD_CPUMODE_THUMB;
43 static inline int quadd_is_cpu_with_lp_cluster(void)
45 #ifdef CONFIG_TEGRA_CLUSTER_CONTROL
52 #endif /* __QUADD_TEGRA_H */