Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cxl: Drop printing of DT properties

There's little reason to dump DT property values when they can be read
at any time from the DT in /proc/device-tree. If such a feature is
needed, then it really should be implemented in the DT core such that
any module/driver can use it.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240729-dt-cxl-cleanup-v1-1-a75eea80d231@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rob Herring (Arm) and committed by
Greg Kroah-Hartman
35fc2654 83a1b574

+3 -98
+3 -98
drivers/misc/cxl/of.c
··· 19 19 const __be32 *prop; 20 20 21 21 prop = of_get_property(np, prop_name, NULL); 22 - if (cxl_verbose && prop) 23 - pr_info("%s: %s\n", prop_name, (char *) prop); 24 22 return prop; 25 23 } 26 24 ··· 30 32 prop = of_get_property(np, prop_name, NULL); 31 33 if (prop) 32 34 *val = be32_to_cpu(prop[0]); 33 - if (cxl_verbose && prop) 34 - pr_info("%s: %#x (%u)\n", prop_name, *val, *val); 35 35 return prop; 36 36 } 37 37 ··· 41 45 prop = of_get_property(np, prop_name, NULL); 42 46 if (prop) 43 47 *val = be64_to_cpu(prop[0]); 44 - if (cxl_verbose && prop) 45 - pr_info("%s: %#llx (%llu)\n", prop_name, *val, *val); 46 48 return prop; 47 49 } 48 50 ··· 94 100 type, prop_name); 95 101 return -EINVAL; 96 102 } 97 - if (cxl_verbose) 98 - pr_info("%s: %#x %#llx (size %#llx)\n", 99 - prop_name, type, addr, size); 100 103 } 101 104 } 102 105 return 0; ··· 130 139 131 140 int cxl_of_read_afu_properties(struct cxl_afu *afu, struct device_node *np) 132 141 { 133 - int i, len, rc; 134 - char *p; 142 + int i, rc; 135 143 const __be32 *prop; 136 144 u16 device_id, vendor_id; 137 145 u32 val = 0, class_code; 138 146 139 147 /* Properties are read in the same order as listed in PAPR */ 140 - 141 - if (cxl_verbose) { 142 - pr_info("Dump of the 'ibm,coherent-platform-function' node properties:\n"); 143 - 144 - prop = of_get_property(np, "compatible", &len); 145 - i = 0; 146 - while (i < len) { 147 - p = (char *) prop + i; 148 - pr_info("compatible: %s\n", p); 149 - i += strlen(p) + 1; 150 - } 151 - read_prop_string(np, "name"); 152 - } 153 148 154 149 rc = read_phys_addr(np, "reg", afu); 155 150 if (rc) ··· 150 173 else 151 174 afu->psa = true; 152 175 153 - if (cxl_verbose) { 154 - read_prop_string(np, "ibm,loc-code"); 155 - read_prop_string(np, "device_type"); 156 - } 157 - 158 176 read_prop_dword(np, "ibm,#processes", &afu->max_procs_virtualised); 159 177 160 - if (cxl_verbose) { 161 - read_prop_dword(np, "ibm,scratchpad-size", &val); 162 - read_prop_dword(np, "ibm,programmable", &val); 163 - read_prop_string(np, "ibm,phandle"); 178 + if (cxl_verbose) 164 179 read_vpd(NULL, afu); 165 - } 166 180 167 181 read_prop_dword(np, "ibm,max-ints-per-process", &afu->guest->max_ints); 168 182 afu->irqs_max = afu->guest->max_ints; ··· 167 199 afu->pp_irqs--; 168 200 } 169 201 170 - if (cxl_verbose) { 171 - read_prop_dword(np, "ibm,max-ints", &val); 172 - read_prop_dword(np, "ibm,vpd-size", &val); 173 - } 174 - 175 202 read_prop64_dword(np, "ibm,error-buffer-size", &afu->eb_len); 176 203 afu->eb_offset = 0; 177 - 178 - if (cxl_verbose) 179 - read_prop_dword(np, "ibm,config-record-type", &val); 180 204 181 205 read_prop64_dword(np, "ibm,config-record-size", &afu->crs_len); 182 206 afu->crs_offset = 0; ··· 195 235 i, class_code); 196 236 } 197 237 } 198 - 199 - read_prop_dword(np, "ibm,function-number", &val); 200 - read_prop_dword(np, "ibm,privileged-function", &val); 201 - read_prop_dword(np, "vendor-id", &val); 202 - read_prop_dword(np, "device-id", &val); 203 - read_prop_dword(np, "revision-id", &val); 204 - read_prop_dword(np, "class-code", &val); 205 - read_prop_dword(np, "subsystem-vendor-id", &val); 206 - read_prop_dword(np, "subsystem-id", &val); 207 238 } 208 239 /* 209 240 * if "ibm,process-mmio" doesn't exist then per-process mmio is ··· 206 255 afu->pp_psa = true; 207 256 else 208 257 afu->pp_psa = false; 209 - 210 - if (cxl_verbose) { 211 - read_prop_dword(np, "ibm,supports-aur", &val); 212 - read_prop_dword(np, "ibm,supports-csrp", &val); 213 - read_prop_dword(np, "ibm,supports-prr", &val); 214 - } 215 258 216 259 prop = read_prop_dword(np, "ibm,function-error-interrupt", &val); 217 260 if (prop) ··· 288 343 289 344 int cxl_of_read_adapter_properties(struct cxl *adapter, struct device_node *np) 290 345 { 291 - int rc, len, naddr, i; 292 - char *p; 346 + int rc; 293 347 const __be32 *prop; 294 348 u32 val = 0; 295 349 296 350 /* Properties are read in the same order as listed in PAPR */ 297 351 298 - naddr = of_n_addr_cells(np); 299 - 300 - if (cxl_verbose) { 301 - pr_info("Dump of the 'ibm,coherent-platform-facility' node properties:\n"); 302 - 303 - read_prop_dword(np, "#address-cells", &val); 304 - read_prop_dword(np, "#size-cells", &val); 305 - 306 - prop = of_get_property(np, "compatible", &len); 307 - i = 0; 308 - while (i < len) { 309 - p = (char *) prop + i; 310 - pr_info("compatible: %s\n", p); 311 - i += strlen(p) + 1; 312 - } 313 - read_prop_string(np, "name"); 314 - read_prop_string(np, "model"); 315 - 316 - prop = of_get_property(np, "reg", NULL); 317 - if (prop) { 318 - pr_info("reg: addr:%#llx size:%#x\n", 319 - of_read_number(prop, naddr), 320 - be32_to_cpu(prop[naddr])); 321 - } 322 - 323 - read_prop_string(np, "ibm,loc-code"); 324 - } 325 - 326 352 if ((rc = read_adapter_irq_config(adapter, np))) 327 353 return rc; 328 - 329 - if (cxl_verbose) { 330 - read_prop_string(np, "device_type"); 331 - read_prop_string(np, "ibm,phandle"); 332 - } 333 354 334 355 prop = read_prop_dword(np, "ibm,caia-version", &val); 335 356 if (prop) { ··· 321 410 prop = read_prop_dword(np, "device-id", &val); 322 411 if (prop) 323 412 adapter->guest->device = val; 324 - 325 - if (cxl_verbose) { 326 - read_prop_dword(np, "ibm,privileged-facility", &val); 327 - read_prop_dword(np, "revision-id", &val); 328 - read_prop_dword(np, "class-code", &val); 329 - } 330 413 331 414 prop = read_prop_dword(np, "subsystem-vendor-id", &val); 332 415 if (prop)