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

TOMOYO Linux Cross Reference
Linux/tools/testing/cxl/test/mock.c

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 /tools/testing/cxl/test/mock.c (Architecture m68k) and /tools/testing/cxl/test/mock.c (Architecture sparc64)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 // SPDX-License-Identifier: GPL-2.0-only
  2 //Copyright(c) 2021 Intel Corporation. All rig      2 //Copyright(c) 2021 Intel Corporation. All rights reserved.
  3                                                     3 
  4 #include <linux/libnvdimm.h>                        4 #include <linux/libnvdimm.h>
  5 #include <linux/rculist.h>                          5 #include <linux/rculist.h>
  6 #include <linux/device.h>                           6 #include <linux/device.h>
  7 #include <linux/export.h>                           7 #include <linux/export.h>
  8 #include <linux/acpi.h>                             8 #include <linux/acpi.h>
  9 #include <linux/pci.h>                              9 #include <linux/pci.h>
 10 #include <cxlmem.h>                                10 #include <cxlmem.h>
 11 #include <cxlpci.h>                                11 #include <cxlpci.h>
 12 #include "mock.h"                                  12 #include "mock.h"
 13                                                    13 
 14 static LIST_HEAD(mock);                            14 static LIST_HEAD(mock);
 15                                                    15 
 16 void register_cxl_mock_ops(struct cxl_mock_ops     16 void register_cxl_mock_ops(struct cxl_mock_ops *ops)
 17 {                                                  17 {
 18         list_add_rcu(&ops->list, &mock);           18         list_add_rcu(&ops->list, &mock);
 19 }                                                  19 }
 20 EXPORT_SYMBOL_GPL(register_cxl_mock_ops);          20 EXPORT_SYMBOL_GPL(register_cxl_mock_ops);
 21                                                    21 
 22 DEFINE_STATIC_SRCU(cxl_mock_srcu);                 22 DEFINE_STATIC_SRCU(cxl_mock_srcu);
 23                                                    23 
 24 void unregister_cxl_mock_ops(struct cxl_mock_o     24 void unregister_cxl_mock_ops(struct cxl_mock_ops *ops)
 25 {                                                  25 {
 26         list_del_rcu(&ops->list);                  26         list_del_rcu(&ops->list);
 27         synchronize_srcu(&cxl_mock_srcu);          27         synchronize_srcu(&cxl_mock_srcu);
 28 }                                                  28 }
 29 EXPORT_SYMBOL_GPL(unregister_cxl_mock_ops);        29 EXPORT_SYMBOL_GPL(unregister_cxl_mock_ops);
 30                                                    30 
 31 struct cxl_mock_ops *get_cxl_mock_ops(int *ind     31 struct cxl_mock_ops *get_cxl_mock_ops(int *index)
 32 {                                                  32 {
 33         *index = srcu_read_lock(&cxl_mock_srcu     33         *index = srcu_read_lock(&cxl_mock_srcu);
 34         return list_first_or_null_rcu(&mock, s     34         return list_first_or_null_rcu(&mock, struct cxl_mock_ops, list);
 35 }                                                  35 }
 36 EXPORT_SYMBOL_GPL(get_cxl_mock_ops);               36 EXPORT_SYMBOL_GPL(get_cxl_mock_ops);
 37                                                    37 
 38 void put_cxl_mock_ops(int index)                   38 void put_cxl_mock_ops(int index)
 39 {                                                  39 {
 40         srcu_read_unlock(&cxl_mock_srcu, index     40         srcu_read_unlock(&cxl_mock_srcu, index);
 41 }                                                  41 }
 42 EXPORT_SYMBOL_GPL(put_cxl_mock_ops);               42 EXPORT_SYMBOL_GPL(put_cxl_mock_ops);
 43                                                    43 
 44 bool __wrap_is_acpi_device_node(const struct f     44 bool __wrap_is_acpi_device_node(const struct fwnode_handle *fwnode)
 45 {                                                  45 {
 46         struct acpi_device *adev =                 46         struct acpi_device *adev =
 47                 container_of(fwnode, struct ac     47                 container_of(fwnode, struct acpi_device, fwnode);
 48         int index;                                 48         int index;
 49         struct cxl_mock_ops *ops = get_cxl_moc     49         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
 50         bool retval = false;                       50         bool retval = false;
 51                                                    51 
 52         if (ops)                                   52         if (ops)
 53                 retval = ops->is_mock_adev(ade     53                 retval = ops->is_mock_adev(adev);
 54                                                    54 
 55         if (!retval)                               55         if (!retval)
 56                 retval = is_acpi_device_node(f     56                 retval = is_acpi_device_node(fwnode);
 57                                                    57 
 58         put_cxl_mock_ops(index);                   58         put_cxl_mock_ops(index);
 59         return retval;                             59         return retval;
 60 }                                                  60 }
 61 EXPORT_SYMBOL(__wrap_is_acpi_device_node);         61 EXPORT_SYMBOL(__wrap_is_acpi_device_node);
 62                                                    62 
 63 int __wrap_acpi_table_parse_cedt(enum acpi_ced     63 int __wrap_acpi_table_parse_cedt(enum acpi_cedt_type id,
 64                                  acpi_tbl_entr     64                                  acpi_tbl_entry_handler_arg handler_arg,
 65                                  void *arg)        65                                  void *arg)
 66 {                                                  66 {
 67         int index, rc;                             67         int index, rc;
 68         struct cxl_mock_ops *ops = get_cxl_moc     68         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
 69                                                    69 
 70         if (ops)                                   70         if (ops)
 71                 rc = ops->acpi_table_parse_ced     71                 rc = ops->acpi_table_parse_cedt(id, handler_arg, arg);
 72         else                                       72         else
 73                 rc = acpi_table_parse_cedt(id,     73                 rc = acpi_table_parse_cedt(id, handler_arg, arg);
 74                                                    74 
 75         put_cxl_mock_ops(index);                   75         put_cxl_mock_ops(index);
 76                                                    76 
 77         return rc;                                 77         return rc;
 78 }                                                  78 }
 79 EXPORT_SYMBOL_NS_GPL(__wrap_acpi_table_parse_c     79 EXPORT_SYMBOL_NS_GPL(__wrap_acpi_table_parse_cedt, ACPI);
 80                                                    80 
 81 acpi_status __wrap_acpi_evaluate_integer(acpi_     81 acpi_status __wrap_acpi_evaluate_integer(acpi_handle handle,
 82                                          acpi_     82                                          acpi_string pathname,
 83                                          struc     83                                          struct acpi_object_list *arguments,
 84                                          unsig     84                                          unsigned long long *data)
 85 {                                                  85 {
 86         int index;                                 86         int index;
 87         struct cxl_mock_ops *ops = get_cxl_moc     87         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
 88         acpi_status status;                        88         acpi_status status;
 89                                                    89 
 90         if (ops)                                   90         if (ops)
 91                 status = ops->acpi_evaluate_in     91                 status = ops->acpi_evaluate_integer(handle, pathname, arguments,
 92                                                    92                                                     data);
 93         else                                       93         else
 94                 status = acpi_evaluate_integer     94                 status = acpi_evaluate_integer(handle, pathname, arguments,
 95                                                    95                                                data);
 96         put_cxl_mock_ops(index);                   96         put_cxl_mock_ops(index);
 97                                                    97 
 98         return status;                             98         return status;
 99 }                                                  99 }
100 EXPORT_SYMBOL(__wrap_acpi_evaluate_integer);      100 EXPORT_SYMBOL(__wrap_acpi_evaluate_integer);
101                                                   101 
102 struct acpi_pci_root *__wrap_acpi_pci_find_roo    102 struct acpi_pci_root *__wrap_acpi_pci_find_root(acpi_handle handle)
103 {                                                 103 {
104         int index;                                104         int index;
105         struct acpi_pci_root *root;               105         struct acpi_pci_root *root;
106         struct cxl_mock_ops *ops = get_cxl_moc    106         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
107                                                   107 
108         if (ops)                                  108         if (ops)
109                 root = ops->acpi_pci_find_root    109                 root = ops->acpi_pci_find_root(handle);
110         else                                      110         else
111                 root = acpi_pci_find_root(hand    111                 root = acpi_pci_find_root(handle);
112                                                   112 
113         put_cxl_mock_ops(index);                  113         put_cxl_mock_ops(index);
114                                                   114 
115         return root;                              115         return root;
116 }                                                 116 }
117 EXPORT_SYMBOL_GPL(__wrap_acpi_pci_find_root);     117 EXPORT_SYMBOL_GPL(__wrap_acpi_pci_find_root);
118                                                   118 
119 struct nvdimm_bus *                               119 struct nvdimm_bus *
120 __wrap_nvdimm_bus_register(struct device *dev,    120 __wrap_nvdimm_bus_register(struct device *dev,
121                            struct nvdimm_bus_d    121                            struct nvdimm_bus_descriptor *nd_desc)
122 {                                                 122 {
123         int index;                                123         int index;
124         struct cxl_mock_ops *ops = get_cxl_moc    124         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
125                                                   125 
126         if (ops && ops->is_mock_dev(dev->paren    126         if (ops && ops->is_mock_dev(dev->parent->parent))
127                 nd_desc->provider_name = "cxl_    127                 nd_desc->provider_name = "cxl_test";
128         put_cxl_mock_ops(index);                  128         put_cxl_mock_ops(index);
129                                                   129 
130         return nvdimm_bus_register(dev, nd_des    130         return nvdimm_bus_register(dev, nd_desc);
131 }                                                 131 }
132 EXPORT_SYMBOL_GPL(__wrap_nvdimm_bus_register);    132 EXPORT_SYMBOL_GPL(__wrap_nvdimm_bus_register);
133                                                   133 
134 struct cxl_hdm *__wrap_devm_cxl_setup_hdm(stru    134 struct cxl_hdm *__wrap_devm_cxl_setup_hdm(struct cxl_port *port,
135                                           stru    135                                           struct cxl_endpoint_dvsec_info *info)
136                                                   136 
137 {                                                 137 {
138         int index;                                138         int index;
139         struct cxl_hdm *cxlhdm;                   139         struct cxl_hdm *cxlhdm;
140         struct cxl_mock_ops *ops = get_cxl_moc    140         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
141                                                   141 
142         if (ops && ops->is_mock_port(port->upo    142         if (ops && ops->is_mock_port(port->uport_dev))
143                 cxlhdm = ops->devm_cxl_setup_h    143                 cxlhdm = ops->devm_cxl_setup_hdm(port, info);
144         else                                      144         else
145                 cxlhdm = devm_cxl_setup_hdm(po    145                 cxlhdm = devm_cxl_setup_hdm(port, info);
146         put_cxl_mock_ops(index);                  146         put_cxl_mock_ops(index);
147                                                   147 
148         return cxlhdm;                            148         return cxlhdm;
149 }                                                 149 }
150 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_setup_hdm    150 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_setup_hdm, CXL);
151                                                   151 
152 int __wrap_devm_cxl_add_passthrough_decoder(st    152 int __wrap_devm_cxl_add_passthrough_decoder(struct cxl_port *port)
153 {                                                 153 {
154         int rc, index;                            154         int rc, index;
155         struct cxl_mock_ops *ops = get_cxl_moc    155         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
156                                                   156 
157         if (ops && ops->is_mock_port(port->upo    157         if (ops && ops->is_mock_port(port->uport_dev))
158                 rc = ops->devm_cxl_add_passthr    158                 rc = ops->devm_cxl_add_passthrough_decoder(port);
159         else                                      159         else
160                 rc = devm_cxl_add_passthrough_    160                 rc = devm_cxl_add_passthrough_decoder(port);
161         put_cxl_mock_ops(index);                  161         put_cxl_mock_ops(index);
162                                                   162 
163         return rc;                                163         return rc;
164 }                                                 164 }
165 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_add_passt    165 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_add_passthrough_decoder, CXL);
166                                                   166 
167 int __wrap_devm_cxl_enumerate_decoders(struct     167 int __wrap_devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
168                                        struct     168                                        struct cxl_endpoint_dvsec_info *info)
169 {                                                 169 {
170         int rc, index;                            170         int rc, index;
171         struct cxl_port *port = cxlhdm->port;     171         struct cxl_port *port = cxlhdm->port;
172         struct cxl_mock_ops *ops = get_cxl_moc    172         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
173                                                   173 
174         if (ops && ops->is_mock_port(port->upo    174         if (ops && ops->is_mock_port(port->uport_dev))
175                 rc = ops->devm_cxl_enumerate_d    175                 rc = ops->devm_cxl_enumerate_decoders(cxlhdm, info);
176         else                                      176         else
177                 rc = devm_cxl_enumerate_decode    177                 rc = devm_cxl_enumerate_decoders(cxlhdm, info);
178         put_cxl_mock_ops(index);                  178         put_cxl_mock_ops(index);
179                                                   179 
180         return rc;                                180         return rc;
181 }                                                 181 }
182 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_enumerate    182 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_enumerate_decoders, CXL);
183                                                   183 
184 int __wrap_devm_cxl_port_enumerate_dports(stru    184 int __wrap_devm_cxl_port_enumerate_dports(struct cxl_port *port)
185 {                                                 185 {
186         int rc, index;                            186         int rc, index;
187         struct cxl_mock_ops *ops = get_cxl_moc    187         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
188                                                   188 
189         if (ops && ops->is_mock_port(port->upo    189         if (ops && ops->is_mock_port(port->uport_dev))
190                 rc = ops->devm_cxl_port_enumer    190                 rc = ops->devm_cxl_port_enumerate_dports(port);
191         else                                      191         else
192                 rc = devm_cxl_port_enumerate_d    192                 rc = devm_cxl_port_enumerate_dports(port);
193         put_cxl_mock_ops(index);                  193         put_cxl_mock_ops(index);
194                                                   194 
195         return rc;                                195         return rc;
196 }                                                 196 }
197 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_port_enum    197 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_port_enumerate_dports, CXL);
198                                                   198 
199 int __wrap_cxl_await_media_ready(struct cxl_de    199 int __wrap_cxl_await_media_ready(struct cxl_dev_state *cxlds)
200 {                                                 200 {
201         int rc, index;                            201         int rc, index;
202         struct cxl_mock_ops *ops = get_cxl_moc    202         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
203                                                   203 
204         if (ops && ops->is_mock_dev(cxlds->dev    204         if (ops && ops->is_mock_dev(cxlds->dev))
205                 rc = 0;                           205                 rc = 0;
206         else                                      206         else
207                 rc = cxl_await_media_ready(cxl    207                 rc = cxl_await_media_ready(cxlds);
208         put_cxl_mock_ops(index);                  208         put_cxl_mock_ops(index);
209                                                   209 
210         return rc;                                210         return rc;
211 }                                                 211 }
212 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_await_media_re    212 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_await_media_ready, CXL);
213                                                   213 
214 int __wrap_cxl_hdm_decode_init(struct cxl_dev_    214 int __wrap_cxl_hdm_decode_init(struct cxl_dev_state *cxlds,
215                                struct cxl_hdm     215                                struct cxl_hdm *cxlhdm,
216                                struct cxl_endp    216                                struct cxl_endpoint_dvsec_info *info)
217 {                                                 217 {
218         int rc = 0, index;                        218         int rc = 0, index;
219         struct cxl_mock_ops *ops = get_cxl_moc    219         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
220                                                   220 
221         if (ops && ops->is_mock_dev(cxlds->dev    221         if (ops && ops->is_mock_dev(cxlds->dev))
222                 rc = 0;                           222                 rc = 0;
223         else                                      223         else
224                 rc = cxl_hdm_decode_init(cxlds    224                 rc = cxl_hdm_decode_init(cxlds, cxlhdm, info);
225         put_cxl_mock_ops(index);                  225         put_cxl_mock_ops(index);
226                                                   226 
227         return rc;                                227         return rc;
228 }                                                 228 }
229 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_hdm_decode_ini    229 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_hdm_decode_init, CXL);
230                                                   230 
231 int __wrap_cxl_dvsec_rr_decode(struct device *    231 int __wrap_cxl_dvsec_rr_decode(struct device *dev, struct cxl_port *port,
232                                struct cxl_endp    232                                struct cxl_endpoint_dvsec_info *info)
233 {                                                 233 {
234         int rc = 0, index;                        234         int rc = 0, index;
235         struct cxl_mock_ops *ops = get_cxl_moc    235         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
236                                                   236 
237         if (ops && ops->is_mock_dev(dev))         237         if (ops && ops->is_mock_dev(dev))
238                 rc = 0;                           238                 rc = 0;
239         else                                      239         else
240                 rc = cxl_dvsec_rr_decode(dev,     240                 rc = cxl_dvsec_rr_decode(dev, port, info);
241         put_cxl_mock_ops(index);                  241         put_cxl_mock_ops(index);
242                                                   242 
243         return rc;                                243         return rc;
244 }                                                 244 }
245 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_dvsec_rr_decod    245 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_dvsec_rr_decode, CXL);
246                                                   246 
247 struct cxl_dport *__wrap_devm_cxl_add_rch_dpor    247 struct cxl_dport *__wrap_devm_cxl_add_rch_dport(struct cxl_port *port,
248                                                   248                                                 struct device *dport_dev,
249                                                   249                                                 int port_id,
250                                                   250                                                 resource_size_t rcrb)
251 {                                                 251 {
252         int index;                                252         int index;
253         struct cxl_dport *dport;                  253         struct cxl_dport *dport;
254         struct cxl_mock_ops *ops = get_cxl_moc    254         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
255                                                   255 
256         if (ops && ops->is_mock_port(dport_dev    256         if (ops && ops->is_mock_port(dport_dev)) {
257                 dport = devm_cxl_add_dport(por    257                 dport = devm_cxl_add_dport(port, dport_dev, port_id,
258                                            CXL    258                                            CXL_RESOURCE_NONE);
259                 if (!IS_ERR(dport)) {             259                 if (!IS_ERR(dport)) {
260                         dport->rcrb.base = rcr    260                         dport->rcrb.base = rcrb;
261                         dport->rch = true;        261                         dport->rch = true;
262                 }                                 262                 }
263         } else                                    263         } else
264                 dport = devm_cxl_add_rch_dport    264                 dport = devm_cxl_add_rch_dport(port, dport_dev, port_id, rcrb);
265         put_cxl_mock_ops(index);                  265         put_cxl_mock_ops(index);
266                                                   266 
267         return dport;                             267         return dport;
268 }                                                 268 }
269 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_add_rch_d    269 EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_add_rch_dport, CXL);
270                                                   270 
271 resource_size_t __wrap_cxl_rcd_component_reg_p    271 resource_size_t __wrap_cxl_rcd_component_reg_phys(struct device *dev,
272                                                   272                                                   struct cxl_dport *dport)
273 {                                                 273 {
274         int index;                                274         int index;
275         resource_size_t component_reg_phys;       275         resource_size_t component_reg_phys;
276         struct cxl_mock_ops *ops = get_cxl_moc    276         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
277                                                   277 
278         if (ops && ops->is_mock_port(dev))        278         if (ops && ops->is_mock_port(dev))
279                 component_reg_phys = CXL_RESOU    279                 component_reg_phys = CXL_RESOURCE_NONE;
280         else                                      280         else
281                 component_reg_phys = cxl_rcd_c    281                 component_reg_phys = cxl_rcd_component_reg_phys(dev, dport);
282         put_cxl_mock_ops(index);                  282         put_cxl_mock_ops(index);
283                                                   283 
284         return component_reg_phys;                284         return component_reg_phys;
285 }                                                 285 }
286 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_rcd_component_    286 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_rcd_component_reg_phys, CXL);
287                                                   287 
288 void __wrap_cxl_endpoint_parse_cdat(struct cxl    288 void __wrap_cxl_endpoint_parse_cdat(struct cxl_port *port)
289 {                                                 289 {
290         int index;                                290         int index;
291         struct cxl_mock_ops *ops = get_cxl_moc    291         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
292         struct cxl_memdev *cxlmd = to_cxl_memd    292         struct cxl_memdev *cxlmd = to_cxl_memdev(port->uport_dev);
293                                                   293 
294         if (ops && ops->is_mock_dev(cxlmd->dev    294         if (ops && ops->is_mock_dev(cxlmd->dev.parent))
295                 ops->cxl_endpoint_parse_cdat(p    295                 ops->cxl_endpoint_parse_cdat(port);
296         else                                      296         else
297                 cxl_endpoint_parse_cdat(port);    297                 cxl_endpoint_parse_cdat(port);
298         put_cxl_mock_ops(index);                  298         put_cxl_mock_ops(index);
299 }                                                 299 }
300 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_endpoint_parse    300 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_endpoint_parse_cdat, CXL);
301                                                   301 
302 void __wrap_cxl_dport_init_ras_reporting(struc    302 void __wrap_cxl_dport_init_ras_reporting(struct cxl_dport *dport, struct device *host)
303 {                                                 303 {
304         int index;                                304         int index;
305         struct cxl_mock_ops *ops = get_cxl_moc    305         struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
306                                                   306 
307         if (!ops || !ops->is_mock_port(dport->    307         if (!ops || !ops->is_mock_port(dport->dport_dev))
308                 cxl_dport_init_ras_reporting(d    308                 cxl_dport_init_ras_reporting(dport, host);
309                                                   309 
310         put_cxl_mock_ops(index);                  310         put_cxl_mock_ops(index);
311 }                                                 311 }
312 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_dport_init_ras    312 EXPORT_SYMBOL_NS_GPL(__wrap_cxl_dport_init_ras_reporting, CXL);
313                                                   313 
314 MODULE_LICENSE("GPL v2");                         314 MODULE_LICENSE("GPL v2");
315 MODULE_IMPORT_NS(ACPI);                           315 MODULE_IMPORT_NS(ACPI);
316 MODULE_IMPORT_NS(CXL);                            316 MODULE_IMPORT_NS(CXL);
317                                                   317 

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