git: 75d1e855b0a2 - main - bhyve: Move power management code to amd64/

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 04 Oct 2023 16:54:04 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=75d1e855b0a2acfb60e5a3c81b018d8f73ebf450

commit 75d1e855b0a2acfb60e5a3c81b018d8f73ebf450
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-10-04 16:23:50 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-04 16:53:16 +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
---
 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 7716ea119dd6..c27cb427f1e2 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -1043,8 +1043,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");