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

TOMOYO Linux Cross Reference
Linux/include/linux/interconnect.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 ] ~

Diff markup

Differences between /include/linux/interconnect.h (Version linux-6.12-rc7) and /include/linux/interconnect.h (Version linux-5.18.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * Copyright (c) 2018-2019, Linaro Ltd.             3  * Copyright (c) 2018-2019, Linaro Ltd.
  4  * Author: Georgi Djakov <georgi.djakov@linaro      4  * Author: Georgi Djakov <georgi.djakov@linaro.org>
  5  */                                                 5  */
  6                                                     6 
  7 #ifndef __LINUX_INTERCONNECT_H                      7 #ifndef __LINUX_INTERCONNECT_H
  8 #define __LINUX_INTERCONNECT_H                      8 #define __LINUX_INTERCONNECT_H
  9                                                     9 
 10 #include <linux/mutex.h>                           10 #include <linux/mutex.h>
 11 #include <linux/types.h>                           11 #include <linux/types.h>
 12                                                    12 
 13 /* macros for converting to icc units */           13 /* macros for converting to icc units */
 14 #define Bps_to_icc(x)   ((x) / 1000)               14 #define Bps_to_icc(x)   ((x) / 1000)
 15 #define kBps_to_icc(x)  (x)                        15 #define kBps_to_icc(x)  (x)
 16 #define MBps_to_icc(x)  ((x) * 1000)               16 #define MBps_to_icc(x)  ((x) * 1000)
 17 #define GBps_to_icc(x)  ((x) * 1000 * 1000)        17 #define GBps_to_icc(x)  ((x) * 1000 * 1000)
 18 #define bps_to_icc(x)   (1)                        18 #define bps_to_icc(x)   (1)
 19 #define kbps_to_icc(x)  ((x) / 8 + ((x) % 8 ?      19 #define kbps_to_icc(x)  ((x) / 8 + ((x) % 8 ? 1 : 0))
 20 #define Mbps_to_icc(x)  ((x) * 1000 / 8)           20 #define Mbps_to_icc(x)  ((x) * 1000 / 8)
 21 #define Gbps_to_icc(x)  ((x) * 1000 * 1000 / 8     21 #define Gbps_to_icc(x)  ((x) * 1000 * 1000 / 8)
 22                                                    22 
 23 struct icc_path;                                   23 struct icc_path;
 24 struct device;                                     24 struct device;
 25                                                    25 
 26 /**                                                26 /**
 27  * struct icc_bulk_data - Data used for bulk i     27  * struct icc_bulk_data - Data used for bulk icc operations.
 28  *                                                 28  *
 29  * @path: reference to the interconnect path (     29  * @path: reference to the interconnect path (internal use)
 30  * @name: the name from the "interconnect-name     30  * @name: the name from the "interconnect-names" DT property
 31  * @avg_bw: average bandwidth in icc units         31  * @avg_bw: average bandwidth in icc units
 32  * @peak_bw: peak bandwidth in icc units           32  * @peak_bw: peak bandwidth in icc units
 33  */                                                33  */
 34 struct icc_bulk_data {                             34 struct icc_bulk_data {
 35         struct icc_path *path;                     35         struct icc_path *path;
 36         const char *name;                          36         const char *name;
 37         u32 avg_bw;                                37         u32 avg_bw;
 38         u32 peak_bw;                               38         u32 peak_bw;
 39 };                                                 39 };
 40                                                    40 
 41 #if IS_ENABLED(CONFIG_INTERCONNECT)                41 #if IS_ENABLED(CONFIG_INTERCONNECT)
 42                                                    42 
                                                   >>  43 struct icc_path *icc_get(struct device *dev, const int src_id,
                                                   >>  44                          const int dst_id);
 43 struct icc_path *of_icc_get(struct device *dev     45 struct icc_path *of_icc_get(struct device *dev, const char *name);
 44 struct icc_path *devm_of_icc_get(struct device     46 struct icc_path *devm_of_icc_get(struct device *dev, const char *name);
 45 int devm_of_icc_bulk_get(struct device *dev, i << 
 46 struct icc_path *of_icc_get_by_index(struct de     47 struct icc_path *of_icc_get_by_index(struct device *dev, int idx);
 47 void icc_put(struct icc_path *path);               48 void icc_put(struct icc_path *path);
 48 int icc_enable(struct icc_path *path);             49 int icc_enable(struct icc_path *path);
 49 int icc_disable(struct icc_path *path);            50 int icc_disable(struct icc_path *path);
 50 int icc_set_bw(struct icc_path *path, u32 avg_     51 int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw);
 51 void icc_set_tag(struct icc_path *path, u32 ta     52 void icc_set_tag(struct icc_path *path, u32 tag);
 52 const char *icc_get_name(struct icc_path *path     53 const char *icc_get_name(struct icc_path *path);
 53 int __must_check of_icc_bulk_get(struct device     54 int __must_check of_icc_bulk_get(struct device *dev, int num_paths,
 54                                  struct icc_bu     55                                  struct icc_bulk_data *paths);
 55 void icc_bulk_put(int num_paths, struct icc_bu     56 void icc_bulk_put(int num_paths, struct icc_bulk_data *paths);
 56 int icc_bulk_set_bw(int num_paths, const struc     57 int icc_bulk_set_bw(int num_paths, const struct icc_bulk_data *paths);
 57 int icc_bulk_enable(int num_paths, const struc     58 int icc_bulk_enable(int num_paths, const struct icc_bulk_data *paths);
 58 void icc_bulk_disable(int num_paths, const str     59 void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths);
 59                                                    60 
 60 #else                                              61 #else
 61                                                    62 
                                                   >>  63 static inline struct icc_path *icc_get(struct device *dev, const int src_id,
                                                   >>  64                                        const int dst_id)
                                                   >>  65 {
                                                   >>  66         return NULL;
                                                   >>  67 }
                                                   >>  68 
 62 static inline struct icc_path *of_icc_get(stru     69 static inline struct icc_path *of_icc_get(struct device *dev,
 63                                           cons     70                                           const char *name)
 64 {                                                  71 {
 65         return NULL;                               72         return NULL;
 66 }                                                  73 }
 67                                                    74 
 68 static inline struct icc_path *devm_of_icc_get     75 static inline struct icc_path *devm_of_icc_get(struct device *dev,
 69                                                    76                                                 const char *name)
 70 {                                                  77 {
 71         return NULL;                               78         return NULL;
 72 }                                                  79 }
 73                                                    80 
 74 static inline struct icc_path *of_icc_get_by_i     81 static inline struct icc_path *of_icc_get_by_index(struct device *dev, int idx)
 75 {                                                  82 {
 76         return NULL;                               83         return NULL;
 77 }                                                  84 }
 78                                                    85 
 79 static inline void icc_put(struct icc_path *pa     86 static inline void icc_put(struct icc_path *path)
 80 {                                                  87 {
 81 }                                                  88 }
 82                                                    89 
 83 static inline int icc_enable(struct icc_path *     90 static inline int icc_enable(struct icc_path *path)
 84 {                                                  91 {
 85         return 0;                                  92         return 0;
 86 }                                                  93 }
 87                                                    94 
 88 static inline int icc_disable(struct icc_path      95 static inline int icc_disable(struct icc_path *path)
 89 {                                                  96 {
 90         return 0;                                  97         return 0;
 91 }                                                  98 }
 92                                                    99 
 93 static inline int icc_set_bw(struct icc_path *    100 static inline int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
 94 {                                                 101 {
 95         return 0;                                 102         return 0;
 96 }                                                 103 }
 97                                                   104 
 98 static inline void icc_set_tag(struct icc_path    105 static inline void icc_set_tag(struct icc_path *path, u32 tag)
 99 {                                                 106 {
100 }                                                 107 }
101                                                   108 
102 static inline const char *icc_get_name(struct     109 static inline const char *icc_get_name(struct icc_path *path)
103 {                                                 110 {
104         return NULL;                              111         return NULL;
105 }                                                 112 }
106                                                   113 
107 static inline int of_icc_bulk_get(struct devic    114 static inline int of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths)
108 {                                              << 
109         return 0;                              << 
110 }                                              << 
111                                                << 
112 static inline int devm_of_icc_bulk_get(struct  << 
113                                        struct  << 
114 {                                                 115 {
115         return 0;                                 116         return 0;
116 }                                                 117 }
117                                                   118 
118 static inline void icc_bulk_put(int num_paths,    119 static inline void icc_bulk_put(int num_paths, struct icc_bulk_data *paths)
119 {                                                 120 {
120 }                                                 121 }
121                                                   122 
122 static inline int icc_bulk_set_bw(int num_path    123 static inline int icc_bulk_set_bw(int num_paths, const struct icc_bulk_data *paths)
123 {                                                 124 {
124         return 0;                                 125         return 0;
125 }                                                 126 }
126                                                   127 
127 static inline int icc_bulk_enable(int num_path    128 static inline int icc_bulk_enable(int num_paths, const struct icc_bulk_data *paths)
128 {                                                 129 {
129         return 0;                                 130         return 0;
130 }                                                 131 }
131                                                   132 
132 static inline void icc_bulk_disable(int num_pa    133 static inline void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths)
133 {                                                 134 {
134 }                                                 135 }
135                                                   136 
136 #endif /* CONFIG_INTERCONNECT */                  137 #endif /* CONFIG_INTERCONNECT */
137                                                   138 
138 #endif /* __LINUX_INTERCONNECT_H */               139 #endif /* __LINUX_INTERCONNECT_H */
139                                                   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