From d066a6fa3cdcff1d767822afb79bc6148add0e24 Mon Sep 17 00:00:00 2001 From: Vijayakumar Date: Mon, 27 Mar 2017 17:39:52 +0530 Subject: gpu: nvgpu: mark bios structures as packed volt and therm bios structures are not marked packed. In VBIOS they are packed, so trying to read them as unpacked causes mismatches. Mark the structures packed to fix the mismatches. JIRA DNVGPU-221 Change-Id: I0e24cc34e2b206fa90982305dcfa390a2452ea8f Signed-off-by: Vijayakumar Reviewed-on: http://git-master/r/1329124 Tested-by: Terje Bergstrom Reviewed-by: David Martinez Nieto Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/include/nvgpu/bios.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/bios.h b/drivers/gpu/nvgpu/include/nvgpu/bios.h index c6465313..6fbf068c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/bios.h +++ b/drivers/gpu/nvgpu/include/nvgpu/bios.h @@ -734,7 +734,7 @@ struct vbios_voltage_device_table_1x_header { u8 header_size; u8 table_entry_size; u8 num_table_entries; -}; +} __packed; struct vbios_voltage_device_table_1x_entry { u8 type; @@ -745,7 +745,7 @@ struct vbios_voltage_device_table_1x_entry { u32 param2; u32 param3; u32 param4; -}; +} __packed; #define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_INVALID 0x00 #define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_PSV 0x02 @@ -796,13 +796,13 @@ struct vbios_voltage_policy_table_1x_header { u8 table_entry_size; u8 num_table_entries; u8 perf_core_vf_seq_policy_idx; -}; +} __packed; struct vbios_voltage_policy_table_1x_entry { u8 type; u32 param0; u32 param1; -}; +} __packed; #define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_INVALID 0x00 #define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SINGLE_RAIL 0x01 @@ -870,7 +870,7 @@ struct therm_channel_1x_header { u8 board_pri_ch_idx; u8 mem_pri_ch_idx; u8 pwr_supply_pri_ch_idx; -}; +} __packed; struct therm_channel_1x_entry { u8 class_id; @@ -878,7 +878,7 @@ struct therm_channel_1x_entry { u8 param1; u8 param2; u8 flags; -}; +} __packed; #define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_CLASS_DEVICE 0x01 -- cgit v1.2.2