Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/nvmm Put the few x86-specific structures under #ifde...
details: https://anonhg.NetBSD.org/src/rev/b09511222304
branches: trunk
changeset: 936643:b09511222304
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Aug 01 08:18:36 2020 +0000
description:
Put the few x86-specific structures under #ifdef __x86_64__, for clarity.
diffstat:
sys/dev/nvmm/nvmm.c | 6 ++++--
sys/dev/nvmm/nvmm.h | 6 +++---
sys/dev/nvmm/nvmm_internal.h | 4 +++-
3 files changed, 10 insertions(+), 6 deletions(-)
diffs (71 lines):
diff -r ccc7aee1f66e -r b09511222304 sys/dev/nvmm/nvmm.c
--- a/sys/dev/nvmm/nvmm.c Sat Aug 01 07:29:04 2020 +0000
+++ b/sys/dev/nvmm/nvmm.c Sat Aug 01 08:18:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm.c,v 1.32 2020/07/03 16:09:54 maxv Exp $ */
+/* $NetBSD: nvmm.c,v 1.33 2020/08/01 08:18:36 maxv Exp $ */
/*
* Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.32 2020/07/03 16:09:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.33 2020/08/01 08:18:36 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,8 +59,10 @@
static volatile unsigned int nmachines __cacheline_aligned;
static const struct nvmm_impl *nvmm_impl_list[] = {
+#if defined(__x86_64__)
&nvmm_x86_svm, /* x86 AMD SVM */
&nvmm_x86_vmx /* x86 Intel VMX */
+#endif
};
static const struct nvmm_impl *nvmm_impl = NULL;
diff -r ccc7aee1f66e -r b09511222304 sys/dev/nvmm/nvmm.h
--- a/sys/dev/nvmm/nvmm.h Sat Aug 01 07:29:04 2020 +0000
+++ b/sys/dev/nvmm/nvmm.h Sat Aug 01 08:18:36 2020 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: nvmm.h,v 1.12 2019/10/28 08:30:49 maxv Exp $ */
+/* $NetBSD: nvmm.h,v 1.13 2020/08/01 08:18:36 maxv Exp $ */
/*
- * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -44,7 +44,7 @@
typedef uint32_t nvmm_machid_t;
typedef uint32_t nvmm_cpuid_t;
-#ifdef __x86_64__
+#if defined(__x86_64__)
#include <dev/nvmm/x86/nvmm_x86.h>
#endif
diff -r ccc7aee1f66e -r b09511222304 sys/dev/nvmm/nvmm_internal.h
--- a/sys/dev/nvmm/nvmm_internal.h Sat Aug 01 07:29:04 2020 +0000
+++ b/sys/dev/nvmm/nvmm_internal.h Sat Aug 01 08:18:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm_internal.h,v 1.16 2020/07/03 16:09:54 maxv Exp $ */
+/* $NetBSD: nvmm_internal.h,v 1.17 2020/08/01 08:18:36 maxv Exp $ */
/*
* Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -119,8 +119,10 @@
struct nvmm_vcpu_exit *);
};
+#if defined(__x86_64__)
extern const struct nvmm_impl nvmm_x86_svm;
extern const struct nvmm_impl nvmm_x86_vmx;
+#endif
static inline bool
nvmm_return_needed(void)
Home |
Main Index |
Thread Index |
Old Index