git: 143fde3faf72 - stable/14 - bhyve: Move power management code to amd64/

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 11 Oct 2023 13:25:10 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=143fde3faf72184227bdbbbf995aa3e5173e6d22

commit 143fde3faf72184227bdbbbf995aa3e5173e6d22
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-10-04 16:23:50 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-11 13:22:00 +0000

    bhyve: Move power management code to amd64/
    
    This implements various x86-specific interfaces.  No functional change
    intended.
    
    Reviewed by:    corvink, jhb
    MFC after:      1 week
    Sponsored by:   Innovate UK
    Differential Revision:  https://reviews.freebsd.org/D40735
    
    (cherry picked from commit 75d1e855b0a2acfb60e5a3c81b018d8f73ebf450)
---
 usr.sbin/bhyve/Makefile           | 1 -
 usr.sbin/bhyve/amd64/Makefile.inc | 1 +
 usr.sbin/bhyve/{ => amd64}/pm.c   | 0
 usr.sbin/bhyve/bhyverun.c         | 2 +-
 4 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index ef78b149c68c..7c14dbc4a524 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -58,7 +58,6 @@ SRCS=	\
 	pci_virtio_scsi.c	\
 	pci_xhci.c		\
 	pctestdev.c		\
-	pm.c			\
 	qemu_fwcfg.c		\
 	qemu_loader.c		\
 	rfb.c			\
diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc
index a18b98a157ec..a176b0e5471f 100644
--- a/usr.sbin/bhyve/amd64/Makefile.inc
+++ b/usr.sbin/bhyve/amd64/Makefile.inc
@@ -4,6 +4,7 @@ SRCS+=	\
 	fwctl.c		\
 	kernemu_dev.c	\
 	mptbl.c		\
+	pm.c		\
 	post.c		\
 	ps2kbd.c	\
 	ps2mouse.c	\
diff --git a/usr.sbin/bhyve/pm.c b/usr.sbin/bhyve/amd64/pm.c
similarity index 100%
rename from usr.sbin/bhyve/pm.c
rename to usr.sbin/bhyve/amd64/pm.c
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index a1ab5bd32fec..2c32e2a56fbb 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -1039,8 +1039,8 @@ main(int argc, char *argv[])
 
 #ifdef __amd64__
 	rtc_init(ctx);
-#endif
 	sci_init(ctx);
+#endif
 
 	if (qemu_fwcfg_init(ctx) != 0) {
 		fprintf(stderr, "qemu fwcfg initialization error");