mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/cxl: Fix endian handling for decoder commit.
Not a real problem yet as all supported architectures are little endian, but continue to tidy these up when touching code for other reasons. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230421135906.3515-3-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
23e1248d7e
commit
92ff7cabf9
2 changed files with 10 additions and 7 deletions
|
@ -47,12 +47,12 @@ static void dumb_hdm_handler(CXLComponentState *cxl_cstate, hwaddr offset,
|
|||
break;
|
||||
}
|
||||
|
||||
stl_le_p((uint8_t *)cache_mem + offset, value);
|
||||
if (should_commit) {
|
||||
ARRAY_FIELD_DP32(cache_mem, CXL_HDM_DECODER0_CTRL, COMMIT, 0);
|
||||
ARRAY_FIELD_DP32(cache_mem, CXL_HDM_DECODER0_CTRL, ERR, 0);
|
||||
ARRAY_FIELD_DP32(cache_mem, CXL_HDM_DECODER0_CTRL, COMMITTED, 1);
|
||||
value = FIELD_DP32(value, CXL_HDM_DECODER0_CTRL, COMMIT, 0);
|
||||
value = FIELD_DP32(value, CXL_HDM_DECODER0_CTRL, ERR, 0);
|
||||
value = FIELD_DP32(value, CXL_HDM_DECODER0_CTRL, COMMITTED, 1);
|
||||
}
|
||||
stl_le_p((uint8_t *)cache_mem + offset, value);
|
||||
}
|
||||
|
||||
static void cxl_cache_mem_write_reg(void *opaque, hwaddr offset, uint64_t value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue