Module Name:    src
Committed By:   maya
Date:           Tue Jul 11 03:07:22 UTC 2017

Modified Files:
        src/sys/arch/powerpc/oea: cpu_subr.c

Log Message:
inline HAVE_64BIT_HID0 and remove macro definition.

Fixes llvm INSTALL kernel build, which failed with:
error: macro expansion producing 'defined' has undefined behavior


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/powerpc/oea/cpu_subr.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/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.84 src/sys/arch/powerpc/oea/cpu_subr.c:1.85
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.84	Fri Jul  7 23:45:53 2017
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Tue Jul 11 03:07:22 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.84 2017/07/07 23:45:53 macallan Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.85 2017/07/11 03:07:22 maya Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.84 2017/07/07 23:45:53 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.85 2017/07/11 03:07:22 maya Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_ppccache.h"
@@ -487,8 +487,6 @@ cpu_attach_common(device_t self, int id)
 	return (ci);
 }
 
-#define HAVE_64BIT_HID0 (defined(PPC_OEA64_BRIDGE) || defined(_ARCH_PPC64))
-
 void
 cpu_setup(device_t self, struct cpu_info *ci)
 {
@@ -497,7 +495,7 @@ cpu_setup(device_t self, struct cpu_info
 	const char *bitmask;
 	char hidbuf[128];
 	char model[80];
-#if HAVE_64BIT_HID0
+#if defined(PPC_OEA64_BRIDGE) || defined(_ARCH_PPC64)
 	char hidbuf_u[128];
 	const char *bitmasku = NULL;
 #endif
@@ -663,7 +661,7 @@ cpu_setup(device_t self, struct cpu_info
 	case IBM970FX:
 	case IBM970MP:
 		bitmask = HID0_970_BITMASK;
-#if HAVE_64BIT_HID0
+#if defined(PPC_OEA64_BRIDGE) || defined(_ARCH_PPC64)
 		bitmasku = HID0_970_BITMASK_U;
 #endif
 		break;
@@ -672,7 +670,7 @@ cpu_setup(device_t self, struct cpu_info
 		break;
 	}
 	
-#if HAVE_64BIT_HID0
+#if defined(PPC_OEA64_BRIDGE) || defined(_ARCH_PPC64)
 	if (bitmasku != NULL) {
 		snprintb(hidbuf, sizeof hidbuf, bitmask, hid0 & 0xffffffff);
 		snprintb(hidbuf_u, sizeof hidbuf_u, bitmasku, hid0 >> 32);

Reply via email to