Skip to content

Commit

Permalink
ACPICA: Add helper macros to extract bus/segment numbers from HEST ta…
Browse files Browse the repository at this point in the history
…ble.

This change adds two macros to extract the encoded bus and segment
numbers from the HEST Bus field.

Signed-off-by: Betty Dall <betty.dall@hp.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Betty Dall authored and Rafael J. Wysocki committed Jan 8, 2014
1 parent f0d7366 commit 36f3615
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/acpi/actbl1.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ struct acpi_hest_aer_common {
u8 enabled;
u32 records_to_preallocate;
u32 max_sections_per_record;
u32 bus;
u32 bus; /* Bus and Segment numbers */
u16 device;
u16 function;
u16 device_control;
Expand All @@ -473,6 +473,14 @@ struct acpi_hest_aer_common {
#define ACPI_HEST_FIRMWARE_FIRST (1)
#define ACPI_HEST_GLOBAL (1<<1)

/*
* Macros to access the bus/segment numbers in Bus field above:
* Bus number is encoded in bits 7:0
* Segment number is encoded in bits 23:8
*/
#define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
#define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)

/* Hardware Error Notification */

struct acpi_hest_notify {
Expand Down

0 comments on commit 36f3615

Please sign in to comment.