]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Clean up the machine dependent headers
authorAndrew Turner <andrew@fubar.geek.nz>
Thu, 19 Mar 2015 15:28:32 +0000 (15:28 +0000)
committerAndrew Turner <andrew@fubar.geek.nz>
Thu, 19 Mar 2015 16:21:16 +0000 (16:21 +0000)
 * Use the format _MACHINE_FOO_H_ as the header guard
 * Make sure we use #define<tab>
 * Have empty files just contain /* $FreeBSD$ */
 * Remove machine/utrap.h a it's not needed

33 files changed:
sys/arm64/include/_align.h
sys/arm64/include/_bus.h
sys/arm64/include/_inttypes.h
sys/arm64/include/_types.h
sys/arm64/include/armreg.h
sys/arm64/include/asm.h
sys/arm64/include/atomic.h
sys/arm64/include/bus.h
sys/arm64/include/bus_dma.h
sys/arm64/include/bus_dma_impl.h
sys/arm64/include/counter.h
sys/arm64/include/cpu.h
sys/arm64/include/db_machdep.h
sys/arm64/include/debug_monitor.h
sys/arm64/include/elf.h
sys/arm64/include/endian.h
sys/arm64/include/exec.h
sys/arm64/include/float.h
sys/arm64/include/ieeefp.h
sys/arm64/include/intr.h
sys/arm64/include/kdb.h
sys/arm64/include/ofw_machdep.h
sys/arm64/include/param.h
sys/arm64/include/pcpu.h
sys/arm64/include/pmap.h
sys/arm64/include/proc.h
sys/arm64/include/pte.h
sys/arm64/include/sf_buf.h
sys/arm64/include/sysarch.h
sys/arm64/include/ucontext.h
sys/arm64/include/utrap.h [deleted file]
sys/arm64/include/vdso.h
sys/arm64/include/vfp.h

index 049909852b13f1f9e4c2bebc45a79cd281a03d94..3844133ffb68882979f24dc47a82f60e607a8ac7 100644 (file)
@@ -30,8 +30,8 @@
  * $FreeBSD$
  */
 
-#ifndef _ARM64_INCLUDE__ALIGN_H_
-#define        _ARM64_INCLUDE__ALIGN_H_
+#ifndef _MACHINE__ALIGN_H_
+#define        _MACHINE__ALIGN_H_
 
 /*
  * Round p (pointer or byte index) up to a correctly-aligned value
@@ -41,4 +41,4 @@
 #define        _ALIGNBYTES     (sizeof(long long) - 1)
 #define        _ALIGN(p)       (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
 
-#endif /* !_ARM64_INCLUDE__ALIGN_H_ */
+#endif /* !_MACHINE__ALIGN_H_ */
index 77a3ad7cb1aee74d5f548835809fce48f6df055d..f11991f65ed4fa945fad6d494b90be6e0d7d35b9 100644 (file)
@@ -28,8 +28,8 @@
  * $FreeBSD$
  */
 
-#ifndef ARM64_INCLUDE__BUS_H
-#define ARM64_INCLUDE__BUS_H
+#ifndef _MACHINE__BUS_H_
+#define        _MACHINE__BUS_H_
 
 /*
  * Addresses (in bus space).
@@ -43,4 +43,4 @@ typedef u_long bus_size_t;
 typedef u_long bus_space_handle_t;
 typedef struct bus_space *bus_space_tag_t;
 
-#endif /* ARM64_INCLUDE__BUS_H */
+#endif /* !_MACHINE__BUS_H_ */
index 264c8753476f567fbbaba431d9444163aea62002..df1af0b25df04a5bb4b6cf873373e211093750be 100644 (file)
@@ -30,8 +30,8 @@
  * $FreeBSD$
  */
 
-#ifndef _MACHINE_INTTYPES_H_
-#define _MACHINE_INTTYPES_H_
+#ifndef _MACHINE__INTTYPES_H_
+#define        _MACHINE__INTTYPES_H_
 
 /*
  * Macros for format specifiers.
 #define        SCNxMAX         "jx"    /* uintmax_t */
 #define        SCNxPTR         "lx"    /* uintptr_t */
 
-#endif /* !_MACHINE_INTTYPES_H_ */
+#endif /* !_MACHINE__INTTYPES_H_ */
index 09e61183d54c32f9cd870114a645419633d74b2b..6a9f846cfafd993aa1dd2c2c3477dec7b01219b4 100644 (file)
@@ -107,7 +107,7 @@ typedef     char *                  __va_list;
 #endif /* __GNUCLIKE_BUILTIN_VARARGS */
 #if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \
     && !defined(__NO_GNUC_VA_LIST)
-#define __GNUC_VA_LIST
+#define        __GNUC_VA_LIST
 typedef __va_list              __gnuc_va_list; /* compatibility w/GNU headers*/
 #endif
 
index 8f847c7094d095036991e629ef658a798547ec2b..aaaca317249a7e68c88d6e8147a1105fd0d3c01c 100644 (file)
 #define        TCR_TxSZ(x)     (((x) << TCR_T1SZ_SHIFT) | ((x) << TCR_T0SZ_SHIFT))
 
 /* Saved Program Status Register */
-#define DBG_SPSR_SS    (0x1 << 21)
+#define        DBG_SPSR_SS     (0x1 << 21)
 
 /* Monitor Debug System Control Register */
-#define DBG_MDSCR_SS   (0x1 << 0)
-#define DBG_MDSCR_KDE  (0x1 << 13)
-#define DBG_MDSCR_MDE  (0x1 << 15)
+#define        DBG_MDSCR_SS    (0x1 << 0)
+#define        DBG_MDSCR_KDE   (0x1 << 13)
+#define        DBG_MDSCR_MDE   (0x1 << 15)
 
-#endif
+#endif /* !_MACHINE_ARMREG_H_ */
index 7449d43f817cc465a81166d517b5e268e5148a1e..9693dfedf91830e3d8b41446b81a61a0d188b8e4 100644 (file)
@@ -30,9 +30,9 @@
 
 #undef __FBSDID
 #if !defined(lint) && !defined(STRIP_FBSDID)
-#define __FBSDID(s)     .ident s
+#define        __FBSDID(s)     .ident s
 #else
-#define __FBSDID(s)     /* nothing */
+#define        __FBSDID(s)     /* nothing */
 #endif
 
 #define        _C_LABEL(x)     x
@@ -41,7 +41,7 @@
        .text; .globl sym; .align 2; sym:
 #define        EENTRY(sym)                                             \
        .globl  sym; sym:
-#define END(sym) .size sym, . - sym
+#define        END(sym) .size sym, . - sym
 #define        EEND(sym)
 
 #define        WEAK_REFERENCE(sym, alias)                              \
index 888dad0d34ccfaaa7f0ff16f692687f3db80089a..4f4397d1422f636909c7ac81ef0bae83b0087a1d 100644 (file)
 #ifndef        _MACHINE_ATOMIC_H_
 #define        _MACHINE_ATOMIC_H_
 
-#define isb()  __asm __volatile("isb" : : : "memory")
-#define dsb()  __asm __volatile("dsb sy" : : : "memory")
-#define dmb()  __asm __volatile("dmb sy" : : : "memory")
+#define        isb()  __asm __volatile("isb" : : : "memory")
+#define        dsb()  __asm __volatile("dsb sy" : : : "memory")
+#define        dmb()  __asm __volatile("dmb sy" : : : "memory")
 
-#define mb()   dmb()
-#define wmb()  dmb()
-#define rmb()  dmb()
+#define        mb()   dmb()
+#define        wmb()  dmb()
+#define        rmb()  dmb()
 
 static __inline void
 atomic_add_32(volatile uint32_t *p, uint32_t val)
index 0d5e82fc9f3b10c1ff9002b47b9ccdaaaff3e6b8..8aaf1d3e76cd18bdd91e7e399bb7b18ed2b56a11 100644 (file)
  */
 
 #ifndef _MACHINE_BUS_H_
-#define _MACHINE_BUS_H_
+#define        _MACHINE_BUS_H_
 
 #include <machine/_bus.h>
 
-#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+#define        BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
 
-#define BUS_SPACE_MAXADDR_24BIT        0xFFFFFFUL
-#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFFUL
-#define BUS_SPACE_MAXSIZE_24BIT        0xFFFFFFUL
-#define BUS_SPACE_MAXSIZE_32BIT        0xFFFFFFFFUL
+#define        BUS_SPACE_MAXADDR_24BIT 0xFFFFFFUL
+#define        BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFFUL
+#define        BUS_SPACE_MAXSIZE_24BIT 0xFFFFFFUL
+#define        BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFFUL
 
-#define BUS_SPACE_MAXADDR      0xFFFFFFFFFFFFFFFFUL
-#define BUS_SPACE_MAXSIZE      0xFFFFFFFFFFFFFFFFUL
+#define        BUS_SPACE_MAXADDR       0xFFFFFFFFFFFFFFFFUL
+#define        BUS_SPACE_MAXSIZE       0xFFFFFFFFFFFFFFFFUL
 
 #define        BUS_SPACE_MAP_CACHEABLE         0x01
 #define        BUS_SPACE_MAP_LINEAR            0x02
@@ -319,9 +319,9 @@ struct bus_space {
 #define        bus_space_read_4(t, h, o)       __bs_rs(4,(t),(h),(o))
 #define        bus_space_read_8(t, h, o)       __bs_rs(8,(t),(h),(o))
 
-#define bus_space_read_stream_1(t, h, o)        __bs_rs_s(1,(t), (h), (o))
-#define bus_space_read_stream_2(t, h, o)        __bs_rs_s(2,(t), (h), (o))
-#define bus_space_read_stream_4(t, h, o)        __bs_rs_s(4,(t), (h), (o))
+#define        bus_space_read_stream_1(t, h, o)        __bs_rs_s(1,(t), (h), (o))
+#define        bus_space_read_stream_2(t, h, o)        __bs_rs_s(2,(t), (h), (o))
+#define        bus_space_read_stream_4(t, h, o)        __bs_rs_s(4,(t), (h), (o))
 #define        bus_space_read_stream_8(t, h, o)        __bs_rs_s(8,8,(t),(h),(o))
 
 /*
@@ -466,14 +466,4 @@ struct bus_space {
 
 #include <machine/bus_dma.h>
 
-#if 0
-/*
- * Get the physical address of a bus space memory-mapped resource.
- * Doing this as a macro is a temporary solution until a more robust fix is
- * designed.  It also serves to mark the locations needing that fix.
- */
-#define BUS_SPACE_PHYSADDR(res, offs) \
-       ((u_int)(rman_get_start(res)+(offs)))
-#endif
-
 #endif /* _MACHINE_BUS_H_ */
index aaac06f1f8760506a46624c264550b0293aa4cf6..820cee5880f3d4f9dc21884e93232d56a9d0544b 100644 (file)
@@ -26,9 +26,9 @@
 
 /* $FreeBSD$ */
 
-#ifndef _ARM64_BUS_DMA_H_
-#define _ARM64_BUS_DMA_H_
+#ifndef _MACHINE_BUS_DMA_H_
+#define        _MACHINE_BUS_DMA_H_
 
 #include <sys/bus_dma.h>
 
-#endif /* _ARM64_BUS_DMA_H_ */
+#endif /* !_MACHINE_BUS_DMA_H_ */
index 48240ec5b5b00cef76a8d995feb340472e3bd266..394e28b0fbed539be6f2d61bd1830acbc8a05fa3 100644 (file)
@@ -29,8 +29,8 @@
  * $FreeBSD$
  */
 
-#ifndef        __ARM64_BUS_DMA_IMPL_H
-#define        __ARM64_BUS_DMA_IMPL_H
+#ifndef        _MACHINE_BUS_DMA_IMPL_H_
+#define        _MACHINE_BUS_DMA_IMPL_H_
 
 struct bus_dma_tag_common {
        struct bus_dma_impl *impl;
@@ -93,4 +93,4 @@ int common_bus_dma_tag_create(struct bus_dma_tag_common *parent,
 
 extern struct bus_dma_impl bus_dma_bounce_impl;
 
-#endif
+#endif /* !_MACHINE_BUS_DMA_IMPL_H_ */
index a3fe871d96936625420e75a0548af5868836a16d..9d56cce3d3d0e6d945bfac8f791cd33247c4222f 100644 (file)
@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
 
-#ifndef __MACHINE_COUNTER_H__
-#define __MACHINE_COUNTER_H__
+#ifndef _MACHINE_COUNTER_H_
+#define        _MACHINE_COUNTER_H_
 
 #include <sys/pcpu.h>
 #ifdef INVARIANTS
@@ -90,4 +90,4 @@ counter_u64_add(counter_u64_t c, int64_t inc)
        counter_exit();
 }
 
-#endif /* ! __MACHINE_COUNTER_H__ */
+#endif /* ! _MACHINE_COUNTER_H_ */
index 06681480da1f24006f144a65da1be4e262a7dc0d..51b27e7549f3a6e652fef5244f863ad56cbc303c 100644 (file)
@@ -38,8 +38,8 @@
  * $FreeBSD$
  */
 
-#ifndef MACHINE_CPU_H
-#define        MACHINE_CPU_H
+#ifndef _MACHINE_CPU_H_
+#define        _MACHINE_CPU_H_
 
 #include <machine/atomic.h>
 #include <machine/frame.h>
@@ -101,4 +101,4 @@ ADDRESS_TRANSLATE_FUNC(s1e1w)
 
 #endif
 
-#endif /* !MACHINE_CPU_H */
+#endif /* !_MACHINE_CPU_H_ */
index 728d317263393b18a5a18ff9032a1f5817bd2dbd..00582b018f75c2a0c2c68049e1e614fdba37b425 100644 (file)
@@ -34,8 +34,8 @@
 #include <machine/frame.h>
 #include <machine/trap.h>
 
-#define T_BREAKPOINT   (EXCP_BRK)
-#define T_WATCHPOINT   (EXCP_WATCHPT_EL1)
+#define        T_BREAKPOINT    (EXCP_BRK)
+#define        T_WATCHPOINT    (EXCP_WATCHPT_EL1)
 
 typedef vm_offset_t    db_addr_t;
 typedef long           db_expr_t;
@@ -50,8 +50,8 @@ typedef long          db_expr_t;
        kdb_frame->tf_elr += BKPT_SIZE; \
 } while (0)
 
-#define db_clear_single_step   kdb_cpu_clear_singlestep
-#define db_set_single_step     kdb_cpu_set_singlestep
+#define        db_clear_single_step    kdb_cpu_clear_singlestep
+#define        db_set_single_step      kdb_cpu_set_singlestep
 
 #define        IS_BREAKPOINT_TRAP(type, code)  (type == T_BREAKPOINT)
 #define        IS_WATCHPOINT_TRAP(type, code)  (type == T_WATCHPOINT)
@@ -62,12 +62,12 @@ typedef long                db_expr_t;
 #define        inst_call(ins)          (((ins) & 0xfc000000u) == 0x94000000u || /* BL */ \
                                 ((ins) & 0xfffffc1fu) == 0xd63f0000u) /* BLR */
 
-#define inst_load(ins) ({                                                      \
+#define        inst_load(ins) ({                                                       \
        uint32_t tmp_instr = db_get_value(PC_REGS(), sizeof(uint32_t), FALSE);  \
        is_load_instr(tmp_instr);                                               \
 })
 
-#define inst_store(ins) ({                                                     \
+#define        inst_store(ins) ({                                                      \
        uint32_t tmp_instr = db_get_value(PC_REGS(), sizeof(uint32_t), FALSE);  \
        is_store_instr(tmp_instr);                                              \
 })
@@ -113,7 +113,7 @@ typedef long                db_expr_t;
                                 (((ins) & 0x3bc00000u) == 0x28800000u) || /* pair (post-indexed) */ \
                                 (((ins) & 0x3bc00000u) == 0x29800000u)) /* pair (pre-indexed) */
 
-#define next_instr_address(pc, bd)     ((bd) ? (pc) : ((pc) + 4))
+#define        next_instr_address(pc, bd)      ((bd) ? (pc) : ((pc) + 4))
 
 #define        DB_SMALL_VALUE_MAX      (0x7fffffff)
 #define        DB_SMALL_VALUE_MIN      (-0x40001)
index 84b270196fc6bf986ece492f29d8a84efe7aa6f3..76eed7bf0a3711bed830b526975679b1096b039c 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #ifndef _MACHINE_DEBUG_MONITOR_H_
-#define _MACHINE_DEBUG_MONITOR_H_
+#define        _MACHINE_DEBUG_MONITOR_H_
 
 #ifdef KDB
 
index f3cbe9c2548de2fe760f49a240a498cb7883c783..32f2e64d9ae18fe4eecf78eefd4230f60d9537a8 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #ifndef        _MACHINE_ELF_H_
-#define        _MACHINE_ELF_H_ 1
+#define        _MACHINE_ELF_H_
 
 /*
  * ELF definitions for the AArch64 architecture.
index bae3d80bfa750dcaa770765879e2c64e7875aa9d..a6a0cb76fd407f5e9791709720d0d1c6b412bbbb 100644 (file)
@@ -30,8 +30,8 @@
  * $FreeBSD$
  */
 
-#ifndef _ENDIAN_H_
-#define        _ENDIAN_H_
+#ifndef _MACHINE_ENDIAN_H_
+#define        _MACHINE_ENDIAN_H_
 
 #include <sys/_types.h>
 
  * Definitions for byte order, according to byte significance from low
  * address to high.
  */
-#define _LITTLE_ENDIAN  1234    /* LSB first: i386, vax */
-#define _BIG_ENDIAN     4321    /* MSB first: 68000, ibm, net */
-#define _PDP_ENDIAN     3412    /* LSB first in word, MSW first in long */
+#define        _LITTLE_ENDIAN  1234    /* LSB first: i386, vax */
+#define        _BIG_ENDIAN     4321    /* MSB first: 68000, ibm, net */
+#define        _PDP_ENDIAN     3412    /* LSB first in word, MSW first in long */
 
 #define        _BYTE_ORDER     _LITTLE_ENDIAN
 
 #if __BSD_VISIBLE
-#define LITTLE_ENDIAN   _LITTLE_ENDIAN
-#define BIG_ENDIAN      _BIG_ENDIAN
-#define PDP_ENDIAN      _PDP_ENDIAN
-#define BYTE_ORDER      _BYTE_ORDER
+#define        LITTLE_ENDIAN   _LITTLE_ENDIAN
+#define        BIG_ENDIAN      _BIG_ENDIAN
+#define        PDP_ENDIAN      _PDP_ENDIAN
+#define        BYTE_ORDER      _BYTE_ORDER
 #endif
 
-#define _QUAD_HIGHWORD  1
-#define _QUAD_LOWWORD 0
-#define __ntohl(x)        (__bswap32(x))
-#define __ntohs(x)        (__bswap16(x))
-#define __htonl(x)        (__bswap32(x))
-#define __htons(x)        (__bswap16(x))
+#define        _QUAD_HIGHWORD  1
+#define        _QUAD_LOWWORD 0
+#define        __ntohl(x)        (__bswap32(x))
+#define        __ntohs(x)        (__bswap16(x))
+#define        __htonl(x)        (__bswap32(x))
+#define        __htons(x)        (__bswap16(x))
 
 static __inline __uint64_t
 __bswap64(__uint64_t x)
@@ -94,29 +94,29 @@ __bswap16_var(__uint16_t v)
 
 #ifdef __OPTIMIZE__
 
-#define __bswap32_constant(x)  \
+#define        __bswap32_constant(x)   \
     ((((x) & 0xff000000U) >> 24) |     \
      (((x) & 0x00ff0000U) >>  8) |     \
      (((x) & 0x0000ff00U) <<  8) |     \
      (((x) & 0x000000ffU) << 24))
 
-#define __bswap16_constant(x)  \
+#define        __bswap16_constant(x)   \
     ((((x) & 0xff00) >> 8) |           \
      (((x) & 0x00ff) << 8))
 
-#define __bswap16(x)   \
+#define        __bswap16(x)    \
     ((__uint16_t)(__builtin_constant_p(x) ?    \
      __bswap16_constant(x) :                   \
      __bswap16_var(x)))
 
-#define __bswap32(x)   \
+#define        __bswap32(x)    \
     ((__uint32_t)(__builtin_constant_p(x) ?    \
      __bswap32_constant(x) :                   \
      __bswap32_var(x)))
 
 #else
-#define __bswap16(x)   __bswap16_var(x)
-#define __bswap32(x)   __bswap32_var(x)
+#define        __bswap16(x)    __bswap16_var(x)
+#define        __bswap32(x)    __bswap32_var(x)
 
 #endif /* __OPTIMIZE__ */
-#endif /* !_ENDIAN_H_ */
+#endif /* !_MACHINE_ENDIAN_H_ */
index d9067923e3335b5a287504e1b8f7ee2b811b4ffe..da23dbe43a4f66856b70e327ef3ea5b3495cffff 100644 (file)
@@ -1,32 +1 @@
-/*-
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef        _MACHINE_EXEC_H_
-#define        _MACHINE_EXEC_H_
-
-#endif /* !_MACHINE_EXEC_H_ */
+/* $FreeBSD$ */
index 2238fd9ed93de0bf441b5e9eaa0f5155841aacfe..095bda7f669269c2b84edf9ed68bde7bb35d284a 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #ifndef _MACHINE_FLOAT_H_
-#define _MACHINE_FLOAT_H_ 1
+#define        _MACHINE_FLOAT_H_
 
 #include <sys/cdefs.h>
 
@@ -43,52 +43,52 @@ __BEGIN_DECLS
 extern int __flt_rounds(void);
 __END_DECLS
 
-#define FLT_RADIX      2               /* b */
+#define        FLT_RADIX       2               /* b */
 #define        FLT_ROUNDS      __flt_rounds()
 #if __ISO_C_VISIBLE >= 1999
 #define        FLT_EVAL_METHOD 0
 #define        DECIMAL_DIG     17              /* max precision in decimal digits */
 #endif
 
-#define FLT_MANT_DIG   24              /* p */
-#define FLT_EPSILON    1.19209290E-07F /* b**(1-p) */
-#define FLT_DIG                6               /* floor((p-1)*log10(b))+(b == 10) */
-#define FLT_MIN_EXP    (-125)          /* emin */
-#define FLT_MIN                1.17549435E-38F /* b**(emin-1) */
-#define FLT_MIN_10_EXP (-37)           /* ceil(log10(b**(emin-1))) */
-#define FLT_MAX_EXP    128             /* emax */
-#define FLT_MAX                3.40282347E+38F /* (1-b**(-p))*b**emax */
-#define FLT_MAX_10_EXP 38              /* floor(log10((1-b**(-p))*b**emax)) */
+#define        FLT_MANT_DIG    24              /* p */
+#define        FLT_EPSILON     1.19209290E-07F /* b**(1-p) */
+#define        FLT_DIG         6               /* floor((p-1)*log10(b))+(b == 10) */
+#define        FLT_MIN_EXP     (-125)          /* emin */
+#define        FLT_MIN         1.17549435E-38F /* b**(emin-1) */
+#define        FLT_MIN_10_EXP  (-37)           /* ceil(log10(b**(emin-1))) */
+#define        FLT_MAX_EXP     128             /* emax */
+#define        FLT_MAX         3.40282347E+38F /* (1-b**(-p))*b**emax */
+#define        FLT_MAX_10_EXP  38              /* floor(log10((1-b**(-p))*b**emax)) */
 #if __ISO_C_VISIBLE >= 2011
 #define        FLT_TRUE_MIN    1.40129846E-45F /* b**(emin-p) */
 #define        FLT_DECIMAL_DIG 9               /* ceil(1+p*log10(b)) */
 #define        FLT_HAS_SUBNORM 1
 #endif /* __ISO_C_VISIBLE >= 2011 */
 
-#define DBL_MANT_DIG   53
-#define DBL_EPSILON    2.2204460492503131E-16
-#define DBL_DIG                15
-#define DBL_MIN_EXP    (-1021)
-#define DBL_MIN                2.2250738585072014E-308
-#define DBL_MIN_10_EXP (-307)
-#define DBL_MAX_EXP    1024
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MAX_10_EXP 308
+#define        DBL_MANT_DIG    53
+#define        DBL_EPSILON     2.2204460492503131E-16
+#define        DBL_DIG         15
+#define        DBL_MIN_EXP     (-1021)
+#define        DBL_MIN         2.2250738585072014E-308
+#define        DBL_MIN_10_EXP  (-307)
+#define        DBL_MAX_EXP     1024
+#define        DBL_MAX         1.7976931348623157E+308
+#define        DBL_MAX_10_EXP  308
 #if __ISO_C_VISIBLE >= 2011
 #define        DBL_TRUE_MIN    4.9406564584124654E-324
 #define        DBL_DECIMAL_DIG 17
 #define        DBL_HAS_SUBNORM 1
 #endif /* __ISO_C_VISIBLE >= 2011 */
 
-#define LDBL_MANT_DIG  113
-#define LDBL_EPSILON   1.925929944387235853055977942584927319E-34L
-#define LDBL_DIG       33
-#define LDBL_MIN_EXP   (-16381)
-#define LDBL_MIN       3.362103143112093506262677817321752603E-4932L
-#define LDBL_MIN_10_EXP        (-4931)
-#define LDBL_MAX_EXP   (+16384)
-#define LDBL_MAX       1.189731495357231765085759326628007016E+4932L
-#define LDBL_MAX_10_EXP        (+4932)
+#define        LDBL_MANT_DIG   113
+#define        LDBL_EPSILON    1.925929944387235853055977942584927319E-34L
+#define        LDBL_DIG        33
+#define        LDBL_MIN_EXP    (-16381)
+#define        LDBL_MIN        3.362103143112093506262677817321752603E-4932L
+#define        LDBL_MIN_10_EXP (-4931)
+#define        LDBL_MAX_EXP    (+16384)
+#define        LDBL_MAX        1.189731495357231765085759326628007016E+4932L
+#define        LDBL_MAX_10_EXP (+4932)
 #if __ISO_C_VISIBLE >= 2011
 #define        LDBL_TRUE_MIN   6.475175119438025110924438958227646552E-4966L
 #define        LDBL_DECIMAL_DIG 36
index 94a0cf7d24f1d861b488215ef9a48bc7333cc43b..09ccb039f0244ac73628e2921abb77157a131318 100644 (file)
@@ -5,17 +5,17 @@
  */
 
 #ifndef _MACHINE_IEEEFP_H_
-#define _MACHINE_IEEEFP_H_
+#define        _MACHINE_IEEEFP_H_
 
 /* Deprecated FPU control interface */
 
 /* FP exception codes */
-#define FP_EXCEPT_INV  0
-#define FP_EXCEPT_DZ   1
-#define FP_EXCEPT_OFL  2
-#define FP_EXCEPT_UFL  3
-#define FP_EXCEPT_IMP  4
-#define FP_EXCEPT_DNML 7
+#define        FP_EXCEPT_INV   0
+#define        FP_EXCEPT_DZ    1
+#define        FP_EXCEPT_OFL   2
+#define        FP_EXCEPT_UFL   3
+#define        FP_EXCEPT_IMP   4
+#define        FP_EXCEPT_DNML  7
 
 typedef int fp_except_t;
 
index 4e0a96af9543256ba13d76db9859885f67541468..1031c64b3ded6645bc50e2b85ec0cea880255577 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #ifndef _MACHINE_INTR_H_
-#define _MACHINE_INTR_H_
+#define        _MACHINE_INTR_H_
 
 int    arm_config_intr(u_int, enum intr_trigger, enum intr_polarity);
 void   arm_cpu_intr(struct trapframe *);
index af8688b8d5a5d16db9be09b0d9d0aa8b57196911..4ff68d6964ac6580578a3c110bfc9d8a259a3480 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #ifndef _MACHINE_KDB_H_
-#define _MACHINE_KDB_H_
+#define        _MACHINE_KDB_H_
 
 #include <machine/cpufunc.h>
 
index d6bd57628584ccca6eb381a3fbd3fad8bce8988e..511fc8d71c19f66427a4c9b968aebf828e14b077 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 #ifndef _MACHINE_OFW_MACHDEP_H_
-#define _MACHINE_OFW_MACHDEP_H_
+#define        _MACHINE_OFW_MACHDEP_H_
 
 #include <vm/vm.h>
 
index 5ed18d518d92c7b467503d8999dc2ecf5304898b..3fb747b4abaaafb9173d24a5162dae75e1a65eee 100644 (file)
@@ -30,8 +30,8 @@
  * $FreeBSD$
  */
 
-#ifndef _ARM64_INCLUDE_PARAM_H_
-#define        _ARM64_INCLUDE_PARAM_H_
+#ifndef _MACHINE_PARAM_H_
+#define        _MACHINE_PARAM_H_
 
 /*
  * Machine dependent constants for arm64.
@@ -39,8 +39,8 @@
 
 #include <machine/_align.h>
 
-#define STACKALIGNBYTES        (16 - 1)
-#define STACKALIGN(p)  ((uint64_t)(p) & ~STACKALIGNBYTES)
+#define        STACKALIGNBYTES (16 - 1)
+#define        STACKALIGN(p)   ((uint64_t)(p) & ~STACKALIGNBYTES)
 
 #ifndef MACHINE
 #define        MACHINE         "arm64"
 #define        MAXPAGESIZES    1               /* maximum number of supported page sizes */
 
 #ifndef KSTACK_PAGES
-#define KSTACK_PAGES   4       /* pages of kernel stack (with pcb) */
+#define        KSTACK_PAGES    4       /* pages of kernel stack (with pcb) */
 #endif
 
-#define KSTACK_GUARD_PAGES     1       /* pages of kstack guard; 0 disables */
-#define PCPU_PAGES             1
+#define        KSTACK_GUARD_PAGES      1       /* pages of kstack guard; 0 disables */
+#define        PCPU_PAGES              1
 
 /*
  * Ceiling on size of buffer cache (really only effects write queueing,
  * the kern.maxbcache /boot/loader.conf variable.
  */
 #ifndef VM_BCACHE_SIZE_MAX
-#define VM_BCACHE_SIZE_MAX      (400 * 1024 * 1024)
+#define        VM_BCACHE_SIZE_MAX      (400 * 1024 * 1024)
 #endif
 
 /*
 #define        NO_FUEWORD      1
 #endif
 
-#endif /* !_ARM64_INCLUDE_PARAM_H_ */
+#endif /* !_MACHINE_PARAM_H_ */
index d78a882d284bb044aad00434d870753cb692d152..6de3e8958735956736f54945ce7f1f2c149c3d91 100644 (file)
@@ -61,7 +61,7 @@ get_curthread(void)
        return (td);
 }
 
-#define curthread get_curthread()
+#define        curthread get_curthread()
 
 #define        PCPU_GET(member)        (get_pcpu()->pc_ ## member)
 #define        PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value))
index 455dc6723217032d555739dce6c54ce517d9796c..8c3c2cba45ccd4ffd83a7b83996932dfa1174dce 100644 (file)
@@ -56,7 +56,7 @@
 
 #ifdef _KERNEL
 
-#define vtophys(va)    pmap_kextract((vm_offset_t)(va))
+#define        vtophys(va)     pmap_kextract((vm_offset_t)(va))
 
 #endif
 
@@ -115,8 +115,8 @@ typedef struct pmap *pmap_t;
 
 #ifdef _KERNEL
 extern struct pmap     kernel_pmap_store;
-#define kernel_pmap    (&kernel_pmap_store)
-#define pmap_kernel() kernel_pmap
+#define        kernel_pmap     (&kernel_pmap_store)
+#define        pmap_kernel()   kernel_pmap
 
 #define        PMAP_ASSERT_LOCKED(pmap) \
                                mtx_assert(&(pmap)->pm_mtx, MA_OWNED)
index 095e5552dfe573e1fbf468192b0d58208d81e8cc..517287648cc195a213c7ba3cfec000882643ab5c 100644 (file)
 #ifndef        _MACHINE_PROC_H_
 #define        _MACHINE_PROC_H_
 
-#include <machine/utrap.h>
-
-#if 0
-struct md_utrap {
-       utrap_entry_t *ut_precise[UT_MAX];      /* must be first */
-       int     ut_refcnt;
-};
-#endif
-
 struct mdthread {
        int     md_spinlock_count;      /* (k) */
        register_t md_saved_daif;       /* (k) */
@@ -52,11 +43,11 @@ struct mdproc {
        int dummy;
 };
 
-#define        KINFO_PROC_SIZE 1088
+#define        KINFO_PROC_SIZE 1088
 
 #ifdef _KERNEL
 
-#define MAXARGS        8
+#define        MAXARGS         8
 struct syscall_args {
        u_int code;
        struct sysent *callp;
index e40e3cbb4e2d4d727066f741df58b582f0d8fcd8..a374552b70d7580eaa2dfe9b7e2dfa07aea59980 100644 (file)
@@ -1,9 +1,11 @@
-/*     $NetBSD: pte.h,v 1.1 2001/11/23 17:39:04 thorpej Exp $  */
-
 /*-
- * Copyright (c) 1994 Mark Brinicombe.
+ * Copyright (c) 2014 Andrew Turner
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
  * All rights reserved.
  *
+ * This software was developed by Andrew Turner under
+ * sponsorship from the FreeBSD Foundation.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the RiscBSD team.
- * 4. The name "RiscBSD" nor the name of the author may be used to
- *    endorse or promote products derived from this software without specific
- *    prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY RISCBSD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL RISCBSD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
  * $FreeBSD$
  */
 
 #ifndef _MACHINE_PTE_H_
-#define _MACHINE_PTE_H_
+#define        _MACHINE_PTE_H_
 
 #ifndef LOCORE
 typedef        uint64_t        pd_entry_t;             /* page directory entry */
index 00b3085991e1a5d8d40bb20e31ea0558e636de91..59f9009bd0867cc05c2e2a7af389779fd8fd616a 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #ifndef _MACHINE_SF_BUF_H_
-#define _MACHINE_SF_BUF_H_
+#define        _MACHINE_SF_BUF_H_
 
 /*
  * On this machine, the only purpose for which sf_buf is used is to implement
index 91a97a523dd31e5cbb4f81c18651d12887c38533..9305385db983fd0f7d2ad2a56c656cef4cb208cc 100644 (file)
@@ -34,7 +34,7 @@
  * Architecture specific syscalls (arm64)
  */
 #ifndef _MACHINE_SYSARCH_H_
-#define _MACHINE_SYSARCH_H_
+#define        _MACHINE_SYSARCH_H_
 
 #ifndef _KERNEL
 
index 983fae501abca35ef75870037c5022920e603168..c20b2b8fe8874929a0c7ad2cf08764b677e110e6 100644 (file)
 #define        _MACHINE_UCONTEXT_H_
 
 struct gpregs {
-       unsigned long long gp_sp;
+       unsigned long long gp_x[30];
        unsigned long long gp_lr;
+       unsigned long long gp_sp;
        unsigned long long gp_elr;
        unsigned long long gp_spsr;
-       unsigned long long gp_x[30];
 };
 
 struct fpregs {
        __uint128_t     fp_q[32];
-       uint32_t        fp_cr;
        uint32_t        fp_sr;
+       uint32_t        fp_cr;
        u_int           fp_flags;
 };
 
diff --git a/sys/arm64/include/utrap.h b/sys/arm64/include/utrap.h
deleted file mode 100644 (file)
index c8fa743..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*-
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef        _MACHINE_UTRAP_H_
-#define        _MACHINE_UTRAP_H_
-
-#define        UT_INSTRUCTION_EXCEPTION        1
-#define        UT_INSTRUCTION_ERROR            2
-#define        UT_INSTRUCTION_PROTECTION       3
-#define        UT_ILLTRAP_INSTRUCTION          4
-#define        UT_ILLEGAL_INSTRUCTION          5
-#define        UT_PRIVILEGED_OPCODE            6
-#define        UT_FP_DISABLED                  7
-#define        UT_FP_EXCEPTION_IEEE_754        8
-#define        UT_FP_EXCEPTION_OTHER           9
-#define        UT_TAG_OVERFLOW                 10
-#define        UT_DIVISION_BY_ZERO             11
-#define        UT_DATA_EXCEPTION               12
-#define        UT_DATA_ERROR                   13
-#define        UT_DATA_PROTECTION              14
-#define        UT_MEM_ADDRESS_NOT_ALIGNED      15
-#define        UT_PRIVILEGED_ACTION            16
-#define        UT_ASYNC_DATA_ERROR             17
-#define        UT_TRAP_INSTRUCTION_16          18
-#define        UT_TRAP_INSTRUCTION_17          19
-#define        UT_TRAP_INSTRUCTION_18          20
-#define        UT_TRAP_INSTRUCTION_19          21
-#define        UT_TRAP_INSTRUCTION_20          22
-#define        UT_TRAP_INSTRUCTION_21          23
-#define        UT_TRAP_INSTRUCTION_22          24
-#define        UT_TRAP_INSTRUCTION_23          25
-#define        UT_TRAP_INSTRUCTION_24          26
-#define        UT_TRAP_INSTRUCTION_25          27
-#define        UT_TRAP_INSTRUCTION_26          28
-#define        UT_TRAP_INSTRUCTION_27          29
-#define        UT_TRAP_INSTRUCTION_28          30
-#define        UT_TRAP_INSTRUCTION_29          31
-#define        UT_TRAP_INSTRUCTION_30          32
-#define        UT_TRAP_INSTRUCTION_31          33
-#define        UT_INSTRUCTION_MISS             34
-#define        UT_DATA_MISS                    35
-#define        UT_MAX                          36
-
-#define        ST_SUNOS_SYSCALL                0
-#define        ST_BREAKPOINT                   1
-#define        ST_DIVISION_BY_ZERO             2
-#define        ST_FLUSH_WINDOWS                3       /* XXX implement! */
-#define        ST_CLEAN_WINDOW                 4
-#define        ST_RANGE_CHECK                  5
-#define        ST_FIX_ALIGNMENT                6
-#define        ST_INTEGER_OVERFLOW             7
-/* 8 is 32-bit ABI syscall (old solaris syscall?) */
-#define        ST_BSD_SYSCALL                  9
-#define        ST_FP_RESTORE                   10
-/* 11-15 are available */
-/* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */
-/* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */
-/* 16-31 are reserved for user applications (utraps) */
-#define        ST_GETCC                        32      /* XXX implement! */
-#define        ST_SETCC                        33      /* XXX implement! */
-#define        ST_GETPSR                       34      /* XXX implement! */
-#define        ST_SETPSR                       35      /* XXX implement! */
-/* 36-63 are available */
-#define        ST_SOLARIS_SYSCALL              64
-#define        ST_SYSCALL                      65
-#define        ST_SYSCALL32                    66
-/* 67 is reserved to OS source licensee */
-/* 68 is return from deferred trap (not supported) */
-/* 69-95 are reserved to SPARC international */
-/* 96-108 are available */
-/* 109 is linux 64 bit syscall */
-/* 110 is linux 64 bit getcontext (?) */
-/* 111 is linux 64 bit setcontext (?) */
-/* 112-255 are available */
-
-#define        UTH_NOCHANGE                    (-1)
-
-#ifndef __ASM__
-
-typedef        int utrap_entry_t;
-typedef void *utrap_handler_t;
-
-#endif
-
-#endif
index 7c17fc9aeb499759f5d6deb7551b765a522b5cb8..5a8f7f555b50251893bc29ca48aa3a269969bea4 100644 (file)
  * $FreeBSD$
  */
 
-#ifndef _ARM64_VDSO_H
-#define        _ARM64_VDSO_H
+#ifndef _MACHINE_VDSO_H_
+#define        _MACHINE_VDSO_H_
 
 #define        VDSO_TIMEHANDS_MD                       \
        uint32_t        th_res[8];
 
-#endif
+#endif /* !_MACHINE_VDSO_H_ */
index b7ede1617d85fcb7d6d9347c0e6632ff6d438ef0..ccb853c8f3ed23e517121eeff607de591080f8a0 100644 (file)
@@ -29,8 +29,8 @@
  * $FreeBSD$
  */
 
-#ifndef _MACHINE__VFP_H_
-#define _MACHINE__VFP_H_
+#ifndef _MACHINE_VFP_H_
+#define        _MACHINE_VFP_H_
 
 #ifdef _KERNEL
 
@@ -43,4 +43,4 @@ void  vfp_save_state(struct thread *);
 
 #endif
 
-#endif
+#endif /* !_MACHINE_VFP_H_ */