summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-11-21 03:02:00 +0000
committerpeter <peter@FreeBSD.org>2003-11-21 03:02:00 +0000
commitaefda7ad568c8310cab954248c6703f913ae46f8 (patch)
tree779c5488e9da51760220a217de1843de9e844d6c /sys/amd64
parent8bb74c49aa521edbbb542e8e7c613a47c82a2007 (diff)
downloadFreeBSD-src-aefda7ad568c8310cab954248c6703f913ae46f8.zip
FreeBSD-src-aefda7ad568c8310cab954248c6703f913ae46f8.tar.gz
Cosmetic and/or trivial sync up with i386.
Approved by: re (rwatson)
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/autoconf.c2
-rw-r--r--sys/amd64/amd64/genassym.c2
-rw-r--r--sys/amd64/amd64/identcpu.c2
-rw-r--r--sys/amd64/amd64/initcpu.c2
-rw-r--r--sys/amd64/amd64/legacy.c2
-rw-r--r--sys/amd64/amd64/mp_machdep.c2
-rw-r--r--sys/amd64/amd64/pmap.c4
-rw-r--r--sys/amd64/amd64/sys_machdep.c2
-rw-r--r--sys/amd64/amd64/trap.c2
-rw-r--r--sys/amd64/amd64/vm_machdep.c2
-rw-r--r--sys/amd64/include/_limits.h23
-rw-r--r--sys/amd64/include/_stdint.h2
-rw-r--r--sys/amd64/include/acpica_machdep.h2
-rw-r--r--sys/amd64/include/asmacros.h2
-rw-r--r--sys/amd64/include/atomic.h14
-rw-r--r--sys/amd64/include/bus_dma.h18
-rw-r--r--sys/amd64/include/limits.h2
-rw-r--r--sys/amd64/include/proc.h2
-rw-r--r--sys/amd64/include/specialreg.h6
-rw-r--r--sys/amd64/isa/isa.c7
-rw-r--r--sys/amd64/isa/isa_dma.c2
21 files changed, 52 insertions, 50 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index adec2e0..7436aad 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)autoconf.c 7.1 (Berkeley) 5/9/91
+ * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
*/
#include <sys/cdefs.h>
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index 27a1a12..58e4606 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)genassym.c 5.11 (Berkeley) 5/10/91
+ * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
*/
#include <sys/cdefs.h>
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c
index f3d70c2..f3d4684 100644
--- a/sys/amd64/amd64/identcpu.c
+++ b/sys/amd64/amd64/identcpu.c
@@ -1,4 +1,4 @@
-/*
+/*-
* Copyright (c) 1992 Terrence R. Lambert.
* Copyright (c) 1982, 1987, 1990 The Regents of the University of California.
* Copyright (c) 1997 KATO Takenori.
diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c
index 1348aec..1d6fd31 100644
--- a/sys/amd64/amd64/initcpu.c
+++ b/sys/amd64/amd64/initcpu.c
@@ -1,4 +1,4 @@
-/*
+/*-
* Copyright (c) KATO Takenori, 1997, 1998.
*
* All rights reserved. Unpublished rights reserved under the copyright
diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c
index a06812c..0acea92 100644
--- a/sys/amd64/amd64/legacy.c
+++ b/sys/amd64/amd64/legacy.c
@@ -1,4 +1,4 @@
-/*
+/*-
* Copyright 1998 Massachusetts Institute of Technology
*
* Permission to use, copy, modify, and distribute this software and
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index fcd478b..3b46b3f 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -130,7 +130,7 @@ struct cpu_info {
} static cpu_info[MAXCPU];
static int cpu_apic_ids[MAXCPU];
-static u_int boot_address;
+static u_int boot_address;
static void set_logical_apic_ids(void);
static int start_all_aps(void);
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index b2f0c18..f0dc985 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1,4 +1,4 @@
-/*
+/*-
* Copyright (c) 1991 Regents of the University of California.
* All rights reserved.
* Copyright (c) 1994 John S. Dyson
@@ -40,7 +40,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)pmap.c 7.7 (Berkeley) 5/12/91
+ * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
*/
/*-
* Copyright (c) 2003 Networks Associates Technology, Inc.
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 8fed5a3..51db46d 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
+ * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
*/
#include <sys/cdefs.h>
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 0e6b95b..afea999 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)trap.c 7.4 (Berkeley) 5/13/91
+ * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
*/
#include <sys/cdefs.h>
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index c4f583f..fad5c4e 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -36,7 +36,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
+ * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
*/
diff --git a/sys/amd64/include/_limits.h b/sys/amd64/include/_limits.h
index 1284b31..60c6143 100644
--- a/sys/amd64/include/_limits.h
+++ b/sys/amd64/include/_limits.h
@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*
* @(#)limits.h 8.3 (Berkeley) 1/4/94
- * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp
- * From: FreeBSD: src/sys/alpha/include/limits.h,v 1.8 2001/11/02
* $FreeBSD$
*/
@@ -53,27 +51,26 @@
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
-#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
+#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
#define __UCHAR_MAX 0xffU /* max value for an unsigned char */
#define __USHRT_MAX 0xffffU /* max value for an unsigned short */
#define __SHRT_MAX 0x7fff /* max value for a short */
-#define __SHRT_MIN (-0x7fff-1) /* min value for a short */
+#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */
#define __UINT_MAX 0xffffffffU /* max value for an unsigned int */
#define __INT_MAX 0x7fffffff /* max value for an int */
-#define __INT_MIN (-0x7fffffff-1) /* min value for an int */
+#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
#define __ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
#define __LONG_MAX 0x7fffffffffffffffL /* max for a long */
-#define __LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
+#define __LONG_MIN (-0x7fffffffffffffffL - 1) /* min for a long */
-/* Long longs and longs are the same size on the alpha. */
- /* max for an unsigned long long */
+ /* max value for an unsigned long long */
#define __ULLONG_MAX 0xffffffffffffffffULL
-#define __LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
-#define __LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
+#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
+#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */
@@ -83,9 +80,9 @@
#define __OFF_MIN __LONG_MIN /* min value for an off_t */
/* Quads and longs are the same on the amd64. Ensure they stay in sync. */
-#define __UQUAD_MAX (__ULONG_MAX) /* max value for a uquad_t */
-#define __QUAD_MAX (__LONG_MAX) /* max value for a quad_t */
-#define __QUAD_MIN (__LONG_MIN) /* min value for a quad_t */
+#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */
+#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */
+#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */
#define __LONG_BIT 64
#define __WORD_BIT 32
diff --git a/sys/amd64/include/_stdint.h b/sys/amd64/include/_stdint.h
index 85dafea..6fd81e5 100644
--- a/sys/amd64/include/_stdint.h
+++ b/sys/amd64/include/_stdint.h
@@ -37,7 +37,7 @@
* $FreeBSD$
*/
-#ifndef _MACHINE__STDINT_H_
+#ifndef _MACHINE__STDINT_H_
#define _MACHINE__STDINT_H_
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
diff --git a/sys/amd64/include/acpica_machdep.h b/sys/amd64/include/acpica_machdep.h
index 71fe5c1..ea501fe 100644
--- a/sys/amd64/include/acpica_machdep.h
+++ b/sys/amd64/include/acpica_machdep.h
@@ -103,6 +103,6 @@
#define COMPILER_DEPENDENT_INT64 long
#define COMPILER_DEPENDENT_UINT64 unsigned long
-void acpi_SetDefaultIntrModel(int model);
+void acpi_SetDefaultIntrModel(int model);
#endif /* __ACPICA_MACHDEP_H__ */
diff --git a/sys/amd64/include/asmacros.h b/sys/amd64/include/asmacros.h
index 404287e..011a01a 100644
--- a/sys/amd64/include/asmacros.h
+++ b/sys/amd64/include/asmacros.h
@@ -115,7 +115,7 @@
#define CROSSJUMPTARGET(label) \
ALIGN_TEXT; __CONCAT(to,label): ; MCOUNT; jmp label
#define ENTRY(name) GEN_ENTRY(name) ; 9: ; MCOUNT
-#define FAKE_MCOUNT(caller) pushq caller ; call __mcount ; popl %ecx
+#define FAKE_MCOUNT(caller) pushq caller ; call __mcount ; popq %rcx
#define MCOUNT call __mcount
#define MCOUNT_LABEL(name) GEN_ENTRY(name) ; nop ; ALIGN_TEXT
#define MEXITCOUNT call HIDENAME(mexitcount)
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index bc10631..cbee271 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -99,7 +99,8 @@ atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\
__asm __volatile(__XSTRING(MPLOCKED) OP \
: "+m" (*p) \
: CONS (V)); \
-}
+} \
+struct __hack
#else /* !__GNUC__ */
@@ -150,7 +151,7 @@ atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src)
" movzbq %%al,%0 ; "
"1: "
"# atomic_cmpset_long"
- : "+a" (res) /* 0 (result) %rax, XXX check */
+ : "+a" (res) /* 0 (result) */
: "r" (src), /* 1 */
"m" (*(dst)) /* 2 */
: "memory");
@@ -185,7 +186,8 @@ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\
: "+m" (*p), /* 0 */ \
"+r" (v) /* 1 */ \
: : "memory"); \
-}
+} \
+struct __hack
#else /* !defined(__GNUC__) */
@@ -330,7 +332,11 @@ atomic_cmpset_ptr(volatile void *dst, void *exp, void *src)
static __inline void *
atomic_load_acq_ptr(volatile void *p)
{
- return (void *)atomic_load_acq_long((volatile u_long *)p);
+ /*
+ * The apparently-bogus cast to intptr_t in the following is to
+ * avoid a warning from "gcc -Wbad-function-cast".
+ */
+ return ((void *)(intptr_t)atomic_load_acq_long((volatile u_long *)p));
}
static __inline void
diff --git a/sys/amd64/include/bus_dma.h b/sys/amd64/include/bus_dma.h
index 4399c6f..7b94b88 100644
--- a/sys/amd64/include/bus_dma.h
+++ b/sys/amd64/include/bus_dma.h
@@ -78,7 +78,7 @@
#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint map memory in a coherent way */
+#define BUS_DMA_COHERENT 0x04 /* hint: map memory in a coherent way */
#define BUS_DMA_ZERO 0x08 /* allocate zero'ed memory */
#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
#define BUS_DMA_BUS2 0x20
@@ -104,7 +104,7 @@ typedef int bus_dmasync_op_t;
* A machine-dependent opaque type describing the characteristics
* of how to perform DMA mappings. This structure encapsultes
* information concerning address and alignment restrictions, number
- * of S/G segments, amount of data per S/G segment, etc.
+ * of S/G segments, amount of data per S/G segment, etc.
*/
typedef struct bus_dma_tag *bus_dma_tag_t;
@@ -133,7 +133,7 @@ typedef struct bus_dma_segment {
typedef int bus_dma_filter_t(void *, bus_addr_t);
/*
- * A function that performs driver-specific syncronization on behalf of
+ * A function that performs driver-specific synchronization on behalf of
* busdma.
*/
typedef enum {
@@ -147,7 +147,7 @@ typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t);
* Allocate a device specific dma_tag encapsulating the constraints of
* the parent tag in addition to other restrictions specified:
*
- * alignment: alignment for segments.
+ * alignment: Alignment for segments.
* boundary: Boundary that segments cannot cross.
* lowaddr: Low restricted address that cannot appear in a mapping.
* highaddr: High restricted address that cannot appear in a mapping.
@@ -184,21 +184,21 @@ int bus_dma_tag_destroy(bus_dma_tag_t dmat);
int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp);
/*
- * Destroy a handle for mapping from kva/uva/physical
+ * Destroy a handle for mapping from kva/uva/physical
* address space into bus device space.
*/
int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map);
/*
* Allocate a piece of memory that can be efficiently mapped into
- * bus device space based on the constraints lited in the dma tag.
+ * bus device space based on the constraints listed in the dma tag.
* A dmamap to for use with dmamap_load is also allocated.
*/
int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
bus_dmamap_t *mapp);
/*
- * Free a piece of memory and it's allociated dmamap, that was allocated
+ * Free a piece of memory and its allocated dmamap, that was allocated
* via bus_dmamem_alloc.
*/
void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map);
@@ -218,7 +218,7 @@ int bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
/*
* Like bus_dmamap_callback but includes map size in bytes. This is
- * defined as a separate interface to maintain compatiiblity for users
+ * defined as a separate interface to maintain compatibility for users
* of bus_dmamap_callback_t--at some point these interfaces should be merged.
*/
typedef void bus_dmamap_callback2_t(void *, bus_dma_segment_t *, int, bus_size_t, int);
@@ -240,7 +240,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
int flags);
/*
- * Perform a syncronization operation on the given map.
+ * Perform a synchronization operation on the given map.
*/
void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
#define bus_dmamap_sync(dmat, dmamap, op) \
diff --git a/sys/amd64/include/limits.h b/sys/amd64/include/limits.h
index 8437ddb..62a34ef 100644
--- a/sys/amd64/include/limits.h
+++ b/sys/amd64/include/limits.h
@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*
* @(#)limits.h 8.3 (Berkeley) 1/4/94
- * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp
- * From: FreeBSD: src/sys/alpha/include/limits.h,v 1.8 2001/11/02
* $FreeBSD$
*/
diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h
index cd54c24..c1a6d90 100644
--- a/sys/amd64/include/proc.h
+++ b/sys/amd64/include/proc.h
@@ -41,7 +41,7 @@
* Machine-dependent part of the proc structure for AMD64.
*/
struct mdthread {
- register_t md_savecrit;
+ register_t md_savecrit;
};
struct mdproc {
diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h
index c9df9c4..083e450 100644
--- a/sys/amd64/include/specialreg.h
+++ b/sys/amd64/include/specialreg.h
@@ -151,9 +151,9 @@
#define MSR_BBL_CR_TRIG 0x11a
#define MSR_BBL_CR_BUSY 0x11b
#define MSR_BBL_CR_CTL3 0x11e
-#define MSR_SYSENTER_CS_MSR 0x174
-#define MSR_SYSENTER_ESP_MSR 0x175
-#define MSR_SYSENTER_EIP_MSR 0x176
+#define MSR_SYSENTER_CS_MSR 0x174
+#define MSR_SYSENTER_ESP_MSR 0x175
+#define MSR_SYSENTER_EIP_MSR 0x176
#define MSR_MCG_CAP 0x179
#define MSR_MCG_STATUS 0x17a
#define MSR_MCG_CTL 0x17b
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c
index 7f2b95d..c87b2db 100644
--- a/sys/amd64/isa/isa.c
+++ b/sys/amd64/isa/isa.c
@@ -23,6 +23,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* Modifications for Intel architecture by Garrett A. Wollman.
* Copyright 1998 Massachusetts Institute of Technology
@@ -53,9 +57,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/malloc.h>
diff --git a/sys/amd64/isa/isa_dma.c b/sys/amd64/isa/isa_dma.c
index a722e80..d8a13fd 100644
--- a/sys/amd64/isa/isa_dma.c
+++ b/sys/amd64/isa/isa_dma.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)isa.c 7.2 (Berkeley) 5/13/91
+ * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
*/
#include <sys/cdefs.h>
OpenPOWER on IntegriCloud