aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2019-03-22 14:06:40 -0400
committerBjorn Helgaas <bhelgaas@google.com>2019-04-13 12:17:36 -0400
commit113fb03ed1d4c1877cc8817e500867616b222380 (patch)
treecb8d707b6b70e9eabbcb49f7e57d9fa39cea3bbd
parent12fa4f47924c9e0638869c2315dda29d50a94446 (diff)
CPER: Remove unnecessary use of user-space types
"__u32" and similar types are intended for things exported to user-space, including structs used in ioctls; see include/uapi/asm-generic/int-l64.h. They are not needed for the CPER struct definitions, which not exported to user-space and not used in ioctls. Replace them with the typical "u32" and similar types. No functional change intended. The reason for changing this is to remove the question of "why do we use __u32 here instead of u32?" We should use __u32 when there's a reason for it; otherwise, we should prefer u32 for consistency. Reference: Documentation/process/coding-style.rst Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Masahiro Yamada <yamada.masahiro@socionext.com> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--include/linux/cper.h286
1 files changed, 143 insertions, 143 deletions
diff --git a/include/linux/cper.h b/include/linux/cper.h
index 2f361a96dc76..cc4980bb0f65 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -323,214 +323,214 @@ enum {
323/* Record Header, UEFI v2.7 sec N.2.1 */ 323/* Record Header, UEFI v2.7 sec N.2.1 */
324struct cper_record_header { 324struct cper_record_header {
325 char signature[CPER_SIG_SIZE]; /* must be CPER_SIG_RECORD */ 325 char signature[CPER_SIG_SIZE]; /* must be CPER_SIG_RECORD */
326 __u16 revision; /* must be CPER_RECORD_REV */ 326 u16 revision; /* must be CPER_RECORD_REV */
327 __u32 signature_end; /* must be CPER_SIG_END */ 327 u32 signature_end; /* must be CPER_SIG_END */
328 __u16 section_count; 328 u16 section_count;
329 __u32 error_severity; 329 u32 error_severity;
330 __u32 validation_bits; 330 u32 validation_bits;
331 __u32 record_length; 331 u32 record_length;
332 __u64 timestamp; 332 u64 timestamp;
333 guid_t platform_id; 333 guid_t platform_id;
334 guid_t partition_id; 334 guid_t partition_id;
335 guid_t creator_id; 335 guid_t creator_id;
336 guid_t notification_type; 336 guid_t notification_type;
337 __u64 record_id; 337 u64 record_id;
338 __u32 flags; 338 u32 flags;
339 __u64 persistence_information; 339 u64 persistence_information;
340 __u8 reserved[12]; /* must be zero */ 340 u8 reserved[12]; /* must be zero */
341}; 341};
342 342
343/* Section Descriptor, UEFI v2.7 sec N.2.2 */ 343/* Section Descriptor, UEFI v2.7 sec N.2.2 */
344struct cper_section_descriptor { 344struct cper_section_descriptor {
345 __u32 section_offset; /* Offset in bytes of the 345 u32 section_offset; /* Offset in bytes of the
346 * section body from the base 346 * section body from the base
347 * of the record header */ 347 * of the record header */
348 __u32 section_length; 348 u32 section_length;
349 __u16 revision; /* must be CPER_RECORD_REV */ 349 u16 revision; /* must be CPER_RECORD_REV */
350 __u8 validation_bits; 350 u8 validation_bits;
351 __u8 reserved; /* must be zero */ 351 u8 reserved; /* must be zero */
352 __u32 flags; 352 u32 flags;
353 guid_t section_type; 353 guid_t section_type;
354 guid_t fru_id; 354 guid_t fru_id;
355 __u32 section_severity; 355 u32 section_severity;
356 __u8 fru_text[20]; 356 u8 fru_text[20];
357}; 357};
358 358
359/* Generic Processor Error Section, UEFI v2.7 sec N.2.4.1 */ 359/* Generic Processor Error Section, UEFI v2.7 sec N.2.4.1 */
360struct cper_sec_proc_generic { 360struct cper_sec_proc_generic {
361 __u64 validation_bits; 361 u64 validation_bits;
362 __u8 proc_type; 362 u8 proc_type;
363 __u8 proc_isa; 363 u8 proc_isa;
364 __u8 proc_error_type; 364 u8 proc_error_type;
365 __u8 operation; 365 u8 operation;
366 __u8 flags; 366 u8 flags;
367 __u8 level; 367 u8 level;
368 __u16 reserved; 368 u16 reserved;
369 __u64 cpu_version; 369 u64 cpu_version;
370 char cpu_brand[128]; 370 char cpu_brand[128];
371 __u64 proc_id; 371 u64 proc_id;
372 __u64 target_addr; 372 u64 target_addr;
373 __u64 requestor_id; 373 u64 requestor_id;
374 __u64 responder_id; 374 u64 responder_id;
375 __u64 ip; 375 u64 ip;
376}; 376};
377 377
378/* IA32/X64 Processor Error Section, UEFI v2.7 sec N.2.4.2 */ 378/* IA32/X64 Processor Error Section, UEFI v2.7 sec N.2.4.2 */
379struct cper_sec_proc_ia { 379struct cper_sec_proc_ia {
380 __u64 validation_bits; 380 u64 validation_bits;
381 __u64 lapic_id; 381 u64 lapic_id;
382 __u8 cpuid[48]; 382 u8 cpuid[48];
383}; 383};
384 384
385/* IA32/X64 Processor Error Information Structure, UEFI v2.7 sec N.2.4.2.1 */ 385/* IA32/X64 Processor Error Information Structure, UEFI v2.7 sec N.2.4.2.1 */
386struct cper_ia_err_info { 386struct cper_ia_err_info {
387 guid_t err_type; 387 guid_t err_type;
388 __u64 validation_bits; 388 u64 validation_bits;
389 __u64 check_info; 389 u64 check_info;
390 __u64 target_id; 390 u64 target_id;
391 __u64 requestor_id; 391 u64 requestor_id;
392 __u64 responder_id; 392 u64 responder_id;
393 __u64 ip; 393 u64 ip;
394}; 394};
395 395
396/* IA32/X64 Processor Context Information Structure, UEFI v2.7 sec N.2.4.2.2 */ 396/* IA32/X64 Processor Context Information Structure, UEFI v2.7 sec N.2.4.2.2 */
397struct cper_ia_proc_ctx { 397struct cper_ia_proc_ctx {
398 __u16 reg_ctx_type; 398 u16 reg_ctx_type;
399 __u16 reg_arr_size; 399 u16 reg_arr_size;
400 __u32 msr_addr; 400 u32 msr_addr;
401 __u64 mm_reg_addr; 401 u64 mm_reg_addr;
402}; 402};
403 403
404/* ARM Processor Error Section, UEFI v2.7 sec N.2.4.4 */ 404/* ARM Processor Error Section, UEFI v2.7 sec N.2.4.4 */
405struct cper_sec_proc_arm { 405struct cper_sec_proc_arm {
406 __u32 validation_bits; 406 u32 validation_bits;
407 __u16 err_info_num; /* Number of Processor Error Info */ 407 u16 err_info_num; /* Number of Processor Error Info */
408 __u16 context_info_num; /* Number of Processor Context Info Records*/ 408 u16 context_info_num; /* Number of Processor Context Info Records*/
409 __u32 section_length; 409 u32 section_length;
410 __u8 affinity_level; 410 u8 affinity_level;
411 __u8 reserved[3]; /* must be zero */ 411 u8 reserved[3]; /* must be zero */
412 __u64 mpidr; 412 u64 mpidr;
413 __u64 midr; 413 u64 midr;
414 __u32 running_state; /* Bit 0 set - Processor running. PSCI = 0 */ 414 u32 running_state; /* Bit 0 set - Processor running. PSCI = 0 */
415 __u32 psci_state; 415 u32 psci_state;
416}; 416};
417 417
418/* ARM Processor Error Information Structure, UEFI v2.7 sec N.2.4.4.1 */ 418/* ARM Processor Error Information Structure, UEFI v2.7 sec N.2.4.4.1 */
419struct cper_arm_err_info { 419struct cper_arm_err_info {
420 __u8 version; 420 u8 version;
421 __u8 length; 421 u8 length;
422 __u16 validation_bits; 422 u16 validation_bits;
423 __u8 type; 423 u8 type;
424 __u16 multiple_error; 424 u16 multiple_error;
425 __u8 flags; 425 u8 flags;
426 __u64 error_info; 426 u64 error_info;
427 __u64 virt_fault_addr; 427 u64 virt_fault_addr;
428 __u64 physical_fault_addr; 428 u64 physical_fault_addr;
429}; 429};
430 430
431/* ARM Processor Context Information Structure, UEFI v2.7 sec N.2.4.4.2 */ 431/* ARM Processor Context Information Structure, UEFI v2.7 sec N.2.4.4.2 */
432struct cper_arm_ctx_info { 432struct cper_arm_ctx_info {
433 __u16 version; 433 u16 version;
434 __u16 type; 434 u16 type;
435 __u32 size; 435 u32 size;
436}; 436};
437 437
438/* Old Memory Error Section, UEFI v2.1, v2.2 */ 438/* Old Memory Error Section, UEFI v2.1, v2.2 */
439struct cper_sec_mem_err_old { 439struct cper_sec_mem_err_old {
440 __u64 validation_bits; 440 u64 validation_bits;
441 __u64 error_status; 441 u64 error_status;
442 __u64 physical_addr; 442 u64 physical_addr;
443 __u64 physical_addr_mask; 443 u64 physical_addr_mask;
444 __u16 node; 444 u16 node;
445 __u16 card; 445 u16 card;
446 __u16 module; 446 u16 module;
447 __u16 bank; 447 u16 bank;
448 __u16 device; 448 u16 device;
449 __u16 row; 449 u16 row;
450 __u16 column; 450 u16 column;
451 __u16 bit_pos; 451 u16 bit_pos;
452 __u64 requestor_id; 452 u64 requestor_id;
453 __u64 responder_id; 453 u64 responder_id;
454 __u64 target_id; 454 u64 target_id;
455 __u8 error_type; 455 u8 error_type;
456}; 456};
457 457
458/* Memory Error Section (UEFI >= v2.3), UEFI v2.7 sec N.2.5 */ 458/* Memory Error Section (UEFI >= v2.3), UEFI v2.7 sec N.2.5 */
459struct cper_sec_mem_err { 459struct cper_sec_mem_err {
460 __u64 validation_bits; 460 u64 validation_bits;
461 __u64 error_status; 461 u64 error_status;
462 __u64 physical_addr; 462 u64 physical_addr;
463 __u64 physical_addr_mask; 463 u64 physical_addr_mask;
464 __u16 node; 464 u16 node;
465 __u16 card; 465 u16 card;
466 __u16 module; 466 u16 module;
467 __u16 bank; 467 u16 bank;
468 __u16 device; 468 u16 device;
469 __u16 row; 469 u16 row;
470 __u16 column; 470 u16 column;
471 __u16 bit_pos; 471 u16 bit_pos;
472 __u64 requestor_id; 472 u64 requestor_id;
473 __u64 responder_id; 473 u64 responder_id;
474 __u64 target_id; 474 u64 target_id;
475 __u8 error_type; 475 u8 error_type;
476 __u8 reserved; 476 u8 reserved;
477 __u16 rank; 477 u16 rank;
478 __u16 mem_array_handle; /* "card handle" in UEFI 2.4 */ 478 u16 mem_array_handle; /* "card handle" in UEFI 2.4 */
479 __u16 mem_dev_handle; /* "module handle" in UEFI 2.4 */ 479 u16 mem_dev_handle; /* "module handle" in UEFI 2.4 */
480}; 480};
481 481
482struct cper_mem_err_compact { 482struct cper_mem_err_compact {
483 __u64 validation_bits; 483 u64 validation_bits;
484 __u16 node; 484 u16 node;
485 __u16 card; 485 u16 card;
486 __u16 module; 486 u16 module;
487 __u16 bank; 487 u16 bank;
488 __u16 device; 488 u16 device;
489 __u16 row; 489 u16 row;
490 __u16 column; 490 u16 column;
491 __u16 bit_pos; 491 u16 bit_pos;
492 __u64 requestor_id; 492 u64 requestor_id;
493 __u64 responder_id; 493 u64 responder_id;
494 __u64 target_id; 494 u64 target_id;
495 __u16 rank; 495 u16 rank;
496 __u16 mem_array_handle; 496 u16 mem_array_handle;
497 __u16 mem_dev_handle; 497 u16 mem_dev_handle;
498}; 498};
499 499
500/* PCI Express Error Section, UEFI v2.7 sec N.2.7 */ 500/* PCI Express Error Section, UEFI v2.7 sec N.2.7 */
501struct cper_sec_pcie { 501struct cper_sec_pcie {
502 __u64 validation_bits; 502 u64 validation_bits;
503 __u32 port_type; 503 u32 port_type;
504 struct { 504 struct {
505 __u8 minor; 505 u8 minor;
506 __u8 major; 506 u8 major;
507 __u8 reserved[2]; 507 u8 reserved[2];
508 } version; 508 } version;
509 __u16 command; 509 u16 command;
510 __u16 status; 510 u16 status;
511 __u32 reserved; 511 u32 reserved;
512 struct { 512 struct {
513 __u16 vendor_id; 513 u16 vendor_id;
514 __u16 device_id; 514 u16 device_id;
515 __u8 class_code[3]; 515 u8 class_code[3];
516 __u8 function; 516 u8 function;
517 __u8 device; 517 u8 device;
518 __u16 segment; 518 u16 segment;
519 __u8 bus; 519 u8 bus;
520 __u8 secondary_bus; 520 u8 secondary_bus;
521 __u16 slot; 521 u16 slot;
522 __u8 reserved; 522 u8 reserved;
523 } device_id; 523 } device_id;
524 struct { 524 struct {
525 __u32 lower; 525 u32 lower;
526 __u32 upper; 526 u32 upper;
527 } serial_number; 527 } serial_number;
528 struct { 528 struct {
529 __u16 secondary_status; 529 u16 secondary_status;
530 __u16 control; 530 u16 control;
531 } bridge; 531 } bridge;
532 __u8 capability[60]; 532 u8 capability[60];
533 __u8 aer_info[96]; 533 u8 aer_info[96];
534}; 534};
535 535
536/* Reset to default packing */ 536/* Reset to default packing */