[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 42/63] hw/cxl: CXLDVSECPortExtensions renamed to CXLDVSECPortExt
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL 42/63] hw/cxl: CXLDVSECPortExtensions renamed to CXLDVSECPortExt |
|
Date: |
Tue, 7 Nov 2023 05:12:35 -0500 |
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Done to reduce line lengths where this is used.
Ext seems sufficiently obvious that it need not be spelt out
fully.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Message-Id: <20231023140210.3089-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/cxl/cxl_pci.h | 6 ++---
hw/cxl/cxl-component-utils.c | 49 ++++++++++++++++++++--------------
hw/pci-bridge/cxl_downstream.c | 2 +-
hw/pci-bridge/cxl_root_port.c | 2 +-
hw/pci-bridge/cxl_upstream.c | 2 +-
5 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/include/hw/cxl/cxl_pci.h b/include/hw/cxl/cxl_pci.h
index 407be95b9e..ddf01a543b 100644
--- a/include/hw/cxl/cxl_pci.h
+++ b/include/hw/cxl/cxl_pci.h
@@ -86,7 +86,7 @@ typedef struct CXLDVSECDevice {
QEMU_BUILD_BUG_ON(sizeof(CXLDVSECDevice) != 0x38);
/* CXL 2.0 - 8.1.5 (ID 0003) */
-typedef struct CXLDVSECPortExtensions {
+typedef struct CXLDVSECPortExt {
DVSECHeader hdr;
uint16_t status;
uint16_t control;
@@ -100,8 +100,8 @@ typedef struct CXLDVSECPortExtensions {
uint32_t alt_prefetch_limit_high;
uint32_t rcrb_base;
uint32_t rcrb_base_high;
-} CXLDVSECPortExtensions;
-QEMU_BUILD_BUG_ON(sizeof(CXLDVSECPortExtensions) != 0x28);
+} CXLDVSECPortExt;
+QEMU_BUILD_BUG_ON(sizeof(CXLDVSECPortExt) != 0x28);
#define PORT_CONTROL_OFFSET 0xc
#define PORT_CONTROL_UNMASK_SBR 1
diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c
index 9d4f4bc8d4..1f4ea11640 100644
--- a/hw/cxl/cxl-component-utils.c
+++ b/hw/cxl/cxl-component-utils.c
@@ -393,26 +393,35 @@ void cxl_component_create_dvsec(CXLComponentState *cxl,
case NON_CXL_FUNCTION_MAP_DVSEC:
break; /* Not yet implemented */
case EXTENSIONS_PORT_DVSEC:
- wmask[offset + offsetof(CXLDVSECPortExtensions, control)] = 0x0F;
- wmask[offset + offsetof(CXLDVSECPortExtensions, control) + 1] = 0x40;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_bus_base)] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_bus_limit)] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_memory_base)] =
0xF0;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_memory_base) + 1]
= 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_memory_limit)] =
0xF0;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_memory_limit) + 1]
= 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_prefetch_base)] =
0xF0;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_prefetch_base) +
1] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_prefetch_limit)] =
0xF0;
- wmask[offset + offsetof(CXLDVSECPortExtensions, alt_prefetch_limit) +
1] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_base_high)] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_base_high) + 1] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_base_high) + 2] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_base_high) + 3] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_limit_high)] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_limit_high) + 1] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_limit_high) + 2] = 0xFF;
- wmask[offset + offsetof(CXLDVSECPortExtensions,
alt_prefetch_limit_high) + 3] = 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, control)] = 0x0F;
+ wmask[offset + offsetof(CXLDVSECPortExt, control) + 1] = 0x40;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_bus_base)] = 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_bus_limit)] = 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_memory_base)] = 0xF0;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_memory_base) + 1] = 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_memory_limit)] = 0xF0;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_memory_limit) + 1] = 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_base)] = 0xF0;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_base) + 1] =
0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_limit)] = 0xF0;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_limit) + 1] =
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_base_high)] =
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_base_high) + 1] =
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_base_high) + 2] =
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_base_high) + 3] =
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_limit_high)] =
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_limit_high) + 1]
=
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_limit_high) + 2]
=
+ 0xFF;
+ wmask[offset + offsetof(CXLDVSECPortExt, alt_prefetch_limit_high) + 3]
=
+ 0xFF;
break;
case GPF_PORT_DVSEC:
wmask[offset + offsetof(CXLDVSECPortGPF, phase1_ctrl)] = 0x0F;
diff --git a/hw/pci-bridge/cxl_downstream.c b/hw/pci-bridge/cxl_downstream.c
index 5a2b749c8e..8c0f759add 100644
--- a/hw/pci-bridge/cxl_downstream.c
+++ b/hw/pci-bridge/cxl_downstream.c
@@ -98,7 +98,7 @@ static void build_dvsecs(CXLComponentState *cxl)
{
uint8_t *dvsec;
- dvsec = (uint8_t *)&(CXLDVSECPortExtensions){ 0 };
+ dvsec = (uint8_t *)&(CXLDVSECPortExt){ 0 };
cxl_component_create_dvsec(cxl, CXL2_DOWNSTREAM_PORT,
EXTENSIONS_PORT_DVSEC_LENGTH,
EXTENSIONS_PORT_DVSEC,
diff --git a/hw/pci-bridge/cxl_root_port.c b/hw/pci-bridge/cxl_root_port.c
index 7dfd20aa67..8f97697631 100644
--- a/hw/pci-bridge/cxl_root_port.c
+++ b/hw/pci-bridge/cxl_root_port.c
@@ -107,7 +107,7 @@ static void build_dvsecs(CXLComponentState *cxl)
{
uint8_t *dvsec;
- dvsec = (uint8_t *)&(CXLDVSECPortExtensions){ 0 };
+ dvsec = (uint8_t *)&(CXLDVSECPortExt){ 0 };
cxl_component_create_dvsec(cxl, CXL2_ROOT_PORT,
EXTENSIONS_PORT_DVSEC_LENGTH,
EXTENSIONS_PORT_DVSEC,
diff --git a/hw/pci-bridge/cxl_upstream.c b/hw/pci-bridge/cxl_upstream.c
index a57806fb31..b81bb5fec9 100644
--- a/hw/pci-bridge/cxl_upstream.c
+++ b/hw/pci-bridge/cxl_upstream.c
@@ -116,7 +116,7 @@ static void build_dvsecs(CXLComponentState *cxl)
{
uint8_t *dvsec;
- dvsec = (uint8_t *)&(CXLDVSECPortExtensions){
+ dvsec = (uint8_t *)&(CXLDVSECPortExt){
.status = 0x1, /* Port Power Management Init Complete */
};
cxl_component_create_dvsec(cxl, CXL2_UPSTREAM_PORT,
--
MST
- [PULL 33/63] tests: bios-tables-test: Update ACPI table binaries for smbios core count2 test, (continued)
- [PULL 33/63] tests: bios-tables-test: Update ACPI table binaries for smbios core count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 35/63] tests: bios-tables-test: Add test for smbios type4 thread count, Michael S. Tsirkin, 2023/11/07
- [PULL 32/63] tests: bios-tables-test: Extend smbios core count2 test to cover general topology, Michael S. Tsirkin, 2023/11/07
- [PULL 37/63] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 thread count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 36/63] tests: bios-tables-test: Add ACPI table binaries for smbios type4 thread count test, Michael S. Tsirkin, 2023/11/07
- [PULL 39/63] tests: bios-tables-test: Add ACPI table binaries for smbios type4 thread count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 40/63] hw/cxl: Use a switch to explicitly check size in caps_reg_read(), Michael S. Tsirkin, 2023/11/07
- [PULL 41/63] hw/cxl: Use switch statements for read and write of cachemem registers, Michael S. Tsirkin, 2023/11/07
- [PULL 38/63] tests: bios-tables-test: Add test for smbios type4 thread count2, Michael S. Tsirkin, 2023/11/07
- [PULL 43/63] hw/cxl: Line length reductions, Michael S. Tsirkin, 2023/11/07
- [PULL 42/63] hw/cxl: CXLDVSECPortExtensions renamed to CXLDVSECPortExt,
Michael S. Tsirkin <=
- [PULL 45/63] hw/cxl/mbox: Pull the payload out of struct cxl_cmd and make instances constant, Michael S. Tsirkin, 2023/11/07
- [PULL 44/63] hw/cxl: Fix a QEMU_BUILD_BUG_ON() in switch statement scope issue., Michael S. Tsirkin, 2023/11/07
- [PULL 47/63] hw/cxl/mbox: Pull the CCI definition out of the CXLDeviceState, Michael S. Tsirkin, 2023/11/07
- [PULL 46/63] hw/cxl/mbox: Split mailbox command payload into separate input and output, Michael S. Tsirkin, 2023/11/07
- [PULL 49/63] hw/pci-bridge/cxl_upstream: Move defintion of device to header., Michael S. Tsirkin, 2023/11/07
- [PULL 50/63] hw/cxl: Add a switch mailbox CCI function, Michael S. Tsirkin, 2023/11/07
- [PULL 48/63] hw/cxl/mbox: Generalize the CCI command processing, Michael S. Tsirkin, 2023/11/07
- [PULL 53/63] hw/pci-bridge/cxl_downstream: Set default link width and link speed, Michael S. Tsirkin, 2023/11/07
- [PULL 52/63] hw/cxl/mbox: Add Physical Switch Identify command., Michael S. Tsirkin, 2023/11/07
- [PULL 54/63] hw/cxl: Implement Physical Ports status retrieval, Michael S. Tsirkin, 2023/11/07