Date: Thu, 18 Jan 2024 17:22:05 GMT From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a2544cc8243f - main - Revert "arm64: fix db_read_bytes() for size == 8" Message-ID: <202401181722.40IHM52I078733@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a2544cc8243f4136a912e08dbe86d8590d25a53d commit a2544cc8243f4136a912e08dbe86d8590d25a53d Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-01-18 17:20:03 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-01-18 17:20:03 +0000 Revert "arm64: fix db_read_bytes() for size == 8" I forgot to include the phabricator link in the commit message. This reverts commit 2e297cbb4fc057e1872114ef8a37a41a6669dd5b. --- sys/arm64/arm64/db_interface.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/arm64/arm64/db_interface.c b/sys/arm64/arm64/db_interface.c index 0b1c58ca88a0..8d97ab46a837 100644 --- a/sys/arm64/arm64/db_interface.c +++ b/sys/arm64/arm64/db_interface.c @@ -124,20 +124,14 @@ db_read_bytes(vm_offset_t addr, size_t size, char *data) if (ret == 0) { src = (const char *)addr; - - /* - * Perform a native-sized memory access, if possible. This - * enables reading from MMIO devices that don't support single - * byte access. - */ if (size == 8 && (addr & 7) == 0) { - tmp64 = *((const uint64_t *)src); + tmp64 = *((const int *)src); src = (const char *)&tmp64; } else if (size == 4 && (addr & 3) == 0) { - tmp32 = *((const uint32_t *)src); + tmp32 = *((const int *)src); src = (const char *)&tmp32; } else if (size == 2 && (addr & 1) == 0) { - tmp16 = *((const uint16_t *)src); + tmp16 = *((const short *)src); src = (const char *)&tmp16; } while (size-- > 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401181722.40IHM52I078733>