aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShengYi Hung <aokblast@FreeBSD.org>2026-07-20 07:26:56 +0000
committerShengYi Hung <aokblast@FreeBSD.org>2026-07-20 07:34:42 +0000
commit7fc2c9f688efb12beddd58a01628157e32b632b0 (patch)
treed92082dbef172bf8afc21f5699ce88419c14b4f9
parenta6587ae0f46dba4e47fa92c831f55288ec181734 (diff)
apei: Fix i386 build over bus read, write function
bus_{read,write}_8 are macro wrappers around the corresponding bus_space functions in sys/bus.h, so implementing bus_{read,write}_8 won't work. Implement the underlying bus_space function instead. Reviewed by: jrtc27, rlibby Fixes: 9313f6b01485 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58301
-rw-r--r--sys/dev/acpica/apeivar.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/acpica/apeivar.h b/sys/dev/acpica/apeivar.h
index 7820641aef1f..524bec4ab0d9 100644
--- a/sys/dev/acpica/apeivar.h
+++ b/sys/dev/acpica/apeivar.h
@@ -38,16 +38,17 @@ int apei_unmap_register(device_t dev, struct resource_map *map);
#ifdef __i386__
static __inline uint64_t
-bus_read_8(struct resource_map *res, bus_size_t offset)
+bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset)
{
- return (bus_read_4(res, offset) |
- ((uint64_t)bus_read_4(res, offset + 4)) << 32);
+ return (bus_space_read_4(tag, bsh, offset) |
+ ((uint64_t)bus_space_read_4(tag, bsh, offset + 4)) << 32);
}
static __inline void
-bus_write_8(struct resource_map *res, bus_size_t offset, uint64_t val)
+bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, uint64_t val)
{
- bus_write_4(res, offset, val);
- bus_write_4(res, offset + 4, val >> 32);
+ bus_space_write_4(tag, bsh, offset, val);
+ bus_space_write_4(tag, bsh, offset + 4, val >> 32);
}
#endif