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

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/intel_telemetry.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Intel SOC Telemetry Driver Header File
  4  * Copyright (C) 2015, Intel Corporation.
  5  * All Rights Reserved.
  6  */
  7 #ifndef INTEL_TELEMETRY_H
  8 #define INTEL_TELEMETRY_H
  9 
 10 #define TELEM_MAX_EVENTS_SRAM           28
 11 #define TELEM_MAX_OS_ALLOCATED_EVENTS   20
 12 
 13 #include <linux/platform_data/x86/intel_scu_ipc.h>
 14 
 15 enum telemetry_unit {
 16         TELEM_PSS = 0,
 17         TELEM_IOSS,
 18         TELEM_UNIT_NONE
 19 };
 20 
 21 struct telemetry_evtlog {
 22         u32 telem_evtid;
 23         u64 telem_evtlog;
 24 };
 25 
 26 struct telemetry_evtconfig {
 27         /* Array of Event-IDs to Enable */
 28         u32 *evtmap;
 29 
 30         /* Number of Events (<29) in evtmap */
 31         u8 num_evts;
 32 
 33         /* Sampling period */
 34         u8 period;
 35 };
 36 
 37 struct telemetry_evtmap {
 38         const char *name;
 39         u32 evt_id;
 40 };
 41 
 42 struct telemetry_unit_config {
 43         struct telemetry_evtmap *telem_evts;
 44         void __iomem *regmap;
 45         u8 ssram_evts_used;
 46         u8 curr_period;
 47         u8 max_period;
 48         u8 min_period;
 49 };
 50 
 51 struct telemetry_plt_config {
 52         struct telemetry_unit_config pss_config;
 53         struct telemetry_unit_config ioss_config;
 54         struct mutex telem_trace_lock;
 55         struct mutex telem_lock;
 56         struct intel_pmc_dev *pmc;
 57         struct intel_scu_ipc_dev *scu;
 58         bool telem_in_use;
 59 };
 60 
 61 struct telemetry_core_ops {
 62         int (*get_sampling_period)(u8 *pss_min_period, u8 *pss_max_period,
 63                                    u8 *ioss_min_period, u8 *ioss_max_period);
 64 
 65         int (*get_eventconfig)(struct telemetry_evtconfig *pss_evtconfig,
 66                                struct telemetry_evtconfig *ioss_evtconfig,
 67                                int pss_len, int ioss_len);
 68 
 69         int (*update_events)(struct telemetry_evtconfig pss_evtconfig,
 70                              struct telemetry_evtconfig ioss_evtconfig);
 71 
 72         int (*set_sampling_period)(u8 pss_period, u8 ioss_period);
 73 
 74         int (*get_trace_verbosity)(enum telemetry_unit telem_unit,
 75                                    u32 *verbosity);
 76 
 77         int (*set_trace_verbosity)(enum telemetry_unit telem_unit,
 78                                    u32 verbosity);
 79 
 80         int (*raw_read_eventlog)(enum telemetry_unit telem_unit,
 81                                  struct telemetry_evtlog *evtlog,
 82                                  int len, int log_all_evts);
 83 
 84         int (*read_eventlog)(enum telemetry_unit telem_unit,
 85                              struct telemetry_evtlog *evtlog,
 86                              int len, int log_all_evts);
 87 
 88         int (*add_events)(u8 num_pss_evts, u8 num_ioss_evts,
 89                           u32 *pss_evtmap, u32 *ioss_evtmap);
 90 
 91         int (*reset_events)(void);
 92 };
 93 
 94 int telemetry_set_pltdata(const struct telemetry_core_ops *ops,
 95                           struct telemetry_plt_config *pltconfig);
 96 
 97 int telemetry_clear_pltdata(void);
 98 
 99 struct telemetry_plt_config *telemetry_get_pltdata(void);
100 
101 int telemetry_get_evtname(enum telemetry_unit telem_unit,
102                           const char **name, int len);
103 
104 int telemetry_update_events(struct telemetry_evtconfig pss_evtconfig,
105                             struct telemetry_evtconfig ioss_evtconfig);
106 
107 int telemetry_add_events(u8 num_pss_evts, u8 num_ioss_evts,
108                          u32 *pss_evtmap, u32 *ioss_evtmap);
109 
110 int telemetry_reset_events(void);
111 
112 int telemetry_get_eventconfig(struct telemetry_evtconfig *pss_config,
113                               struct telemetry_evtconfig *ioss_config,
114                               int pss_len, int ioss_len);
115 
116 int telemetry_read_events(enum telemetry_unit telem_unit,
117                           struct telemetry_evtlog *evtlog, int len);
118 
119 int telemetry_raw_read_events(enum telemetry_unit telem_unit,
120                               struct telemetry_evtlog *evtlog, int len);
121 
122 int telemetry_read_eventlog(enum telemetry_unit telem_unit,
123                             struct telemetry_evtlog *evtlog, int len);
124 
125 int telemetry_raw_read_eventlog(enum telemetry_unit telem_unit,
126                                 struct telemetry_evtlog *evtlog, int len);
127 
128 int telemetry_get_sampling_period(u8 *pss_min_period, u8 *pss_max_period,
129                                   u8 *ioss_min_period, u8 *ioss_max_period);
130 
131 int telemetry_set_sampling_period(u8 pss_period, u8 ioss_period);
132 
133 int telemetry_set_trace_verbosity(enum telemetry_unit telem_unit,
134                                   u32 verbosity);
135 
136 int telemetry_get_trace_verbosity(enum telemetry_unit telem_unit,
137                                   u32 *verbosity);
138 
139 #endif /* INTEL_TELEMETRY_H */
140 

~ [ 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