Module Name: src
Committed By: pgoyette
Date: Sat Mar 17 00:41:33 UTC 2018
Modified Files:
src/sys/arch/x86/x86 [pgoyette-compat]: cpu_ucode.c
Log Message:
Don't try to include opt_*.h files if we're not being built as part
of a kernel (these files only exist for kernel builds).
Don't compile non-compat code if we're not building a module. (This
file is built for both built-in kernel ucode support and for compat
support.)
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.16.1 src/sys/arch/x86/x86/cpu_ucode.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/cpu_ucode.c
diff -u src/sys/arch/x86/x86/cpu_ucode.c:1.5 src/sys/arch/x86/x86/cpu_ucode.c:1.5.16.1
--- src/sys/arch/x86/x86/cpu_ucode.c:1.5 Wed Jan 7 07:05:48 2015
+++ src/sys/arch/x86/x86/cpu_ucode.c Sat Mar 17 00:41:33 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode.c,v 1.5 2015/01/07 07:05:48 ozaki-r Exp $ */
+/* $NetBSD: cpu_ucode.c,v 1.5.16.1 2018/03/17 00:41:33 pgoyette Exp $ */
/*
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,10 +29,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_ucode.c,v 1.5 2015/01/07 07:05:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_ucode.c,v 1.5.16.1 2018/03/17 00:41:33 pgoyette Exp $");
+#if defined(_KERNEL_OPT)
#include "opt_cpu_ucode.h"
#include "opt_compat_netbsd.h"
+#endif
#include <sys/param.h>
#include <sys/cpuio.h>
@@ -47,6 +49,8 @@ __KERNEL_RCSID(0, "$NetBSD: cpu_ucode.c,
static struct cpu_ucode_softc ucode_softc;
+#ifndef _MODULE
+
int
cpu_ucode_get_version(struct cpu_ucode_version *data)
{
@@ -62,6 +66,7 @@ cpu_ucode_get_version(struct cpu_ucode_v
return 0;
}
+#endif /* ! _MODULE */
#ifdef COMPAT_60
int
@@ -79,6 +84,7 @@ compat6_cpu_ucode_get_version(struct com
}
#endif /* COMPAT60 */
+#ifndef _MODULE
int
cpu_ucode_md_open(firmware_handle_t *fwh, int loader_version, const char *fwname)
{
@@ -121,6 +127,7 @@ cpu_ucode_apply(const struct cpu_ucode *
sc->sc_blobsize = 0;
return error;
}
+#endif /* ! _MODULE */
#ifdef COMPAT_60
int