From 120e8796ffbdcaa979a22de71b2036a64d924b08 Mon Sep 17 00:00:00 2001 From: Igor Nabirushkin Date: Wed, 29 Apr 2015 10:44:01 +0400 Subject: misc: tegra-profiler: add cpu notifier Detect when the CPU goes online/offline. Bug 1634024 Change-Id: I989a9aefbc32a70070b37fe42ce5dcf75b18263b Signed-off-by: Igor Nabirushkin Reviewed-on: http://git-master/r/729497 (cherry picked from commit a2eec5a5ea12fb50e073b322ca9d948818179968) Reviewed-on: http://git-master/r/748094 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Andrey Trachenko Reviewed-by: Winnie Hsu --- include/linux/tegra_profiler.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/tegra_profiler.h b/include/linux/tegra_profiler.h index 3462998f9872..caf58e63ed70 100644 --- a/include/linux/tegra_profiler.h +++ b/include/linux/tegra_profiler.h @@ -1,7 +1,7 @@ /* * include/linux/tegra_profiler.h * - * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2013-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -19,7 +19,7 @@ #include -#define QUADD_SAMPLES_VERSION 33 +#define QUADD_SAMPLES_VERSION 34 #define QUADD_IO_VERSION 18 #define QUADD_IO_VERSION_DYNAMIC_RB 5 @@ -52,6 +52,7 @@ #define QUADD_SAMPLE_VERSION_STACK_OFFSET 31 #define QUADD_SAMPLE_VERSION_SCHED_TASK_STATE 32 #define QUADD_SAMPLE_VERSION_URCS 33 +#define QUADD_SAMPLE_VERSION_HOTPLUG 34 #define QUADD_MMAP_HEADER_VERSION 1 @@ -152,6 +153,7 @@ enum quadd_record_type { QUADD_RECORD_TYPE_POWER_RATE, QUADD_RECORD_TYPE_ADDITIONAL_SAMPLE, QUADD_RECORD_TYPE_SCHED, + QUADD_RECORD_TYPE_HOTPLUG, }; enum quadd_event_source { @@ -258,6 +260,14 @@ struct quadd_power_rate_data { u32 emc; }; +struct quadd_hotplug_data { + u64 time; + u32 cpu; + + u32 is_online:1, + reserved:31; +}; + struct quadd_additional_sample { u8 type; @@ -353,6 +363,7 @@ struct quadd_record_data { struct quadd_debug_data debug; struct quadd_header_data hdr; struct quadd_power_rate_data power_rate; + struct quadd_hotplug_data hotplug; struct quadd_sched_data sched; struct quadd_additional_sample additional_sample; }; -- cgit v1.2.3