PERFORCE change 132308 for review

Warner Losh imp at FreeBSD.org
Wed Jan 2 09:08:21 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=132308

Change 132308 by imp at imp_paco-paco on 2008/01/02 17:07:34

	Merge david's stylistic changes.  Only 15 conflicts, but I
	only had to think about one.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/conf/GENERIC#1 branch
.. //depot/projects/mips2-jnpr/src/sys/mips/conf/GENERIC.hints#1 branch
.. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/ns16550.c#1 branch
.. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/sio.c#1 branch
.. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/sio_isa.c#1 branch
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_bus.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_inttypes.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_limits.h#4 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_stdint.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_types.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/am29lv081b.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/archtype.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/bootinfo.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/bswap.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/bus.h#5 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/clockvar.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/cp0.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/cpuconf.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/cpufunc.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/db_machdep.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/defs.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/defs_mips.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/elf.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/exec.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/float.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/frame.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/gdb_machdep.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/ieeefp.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/in_cksum.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/kdb.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/limits.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/memdev.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/mips_opcode.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/ns16550.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/param.h#4 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pcb.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pcpu.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pltfm.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pmc_mdep.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/proc.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/profile.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/psl.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pte.h#4 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/ptrace.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/queue.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/reg.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/regdef.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/regnum.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/reloc.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/resource.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/rm7000.h#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/runq.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/setjmp.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/sf_buf.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/sigframe.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/signal.h#4 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/smp.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/stdarg.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/trap.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/ucontext.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/varargs.h#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/include/vmparam.h#5 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/cache.S#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/copystr.S#2 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/cpu.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_disasm.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_interface.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_trace.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/elf_machdep.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/fp.S#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/gdb_machdep.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/genassym.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#4 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/mainbus.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/mem.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/mips_subr.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/mp_machdep.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/pm_machdep.c#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#4 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/psraccess.S#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/support.S#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.S#2 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/uio_machdep.c#3 integrate
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#3 integrate

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/include/_bus.h#3 (text+ko) ====

@@ -25,11 +25,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/_bus.h,v 1.1 2005/04/18 21:45:33 imp Exp $
+ * from: src/sys/i386/include/_bus.h,v 1.1 2005/04/18 21:45:33 imp
+ * $FreeBSD$
  */
 
 #ifndef MIPS_INCLUDE__BUS_H
-#define MIPS_INCLUDE__BUS_H
+#define	MIPS_INCLUDE__BUS_H
 
 /*
  * Bus address and size types
@@ -40,7 +41,7 @@
 /*
  * Access methods for bus resources and address space.
  */
-typedef	int bus_space_tag_t;
-typedef	u_int bus_space_handle_t;
+typedef int bus_space_tag_t;
+typedef u_int bus_space_handle_t;
 
 #endif /* MIPS_INCLUDE__BUS_H */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/_inttypes.h#3 (text+ko) ====

@@ -34,11 +34,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  *
  *	From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $
- * $FreeBSD: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike Exp $
+ *	from: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike
+ * $FreeBSD$
  */
 
 #ifndef _MACHINE_INTTYPES_H_
-#define _MACHINE_INTTYPES_H_
+#define	_MACHINE_INTTYPES_H_
 
 /*
  * Macros for format specifiers.

==== //depot/projects/mips2-jnpr/src/sys/mips/include/_limits.h#4 (text+ko) ====

@@ -27,7 +27,8 @@
  * SUCH DAMAGE.
  *
  *	@(#)limits.h	8.3 (Berkeley) 1/4/94
- * $FreeBSD: src/sys/i386/include/_limits.h,v 1.27 2005/01/06 22:18:15 imp Exp $
+ *	from: src/sys/i386/include/_limits.h,v 1.27 2005/01/06 22:18:15 imp
+ * $FreeBSD$
  */
 
 #ifndef _MACHINE__LIMITS_H_

==== //depot/projects/mips2-jnpr/src/sys/mips/include/_stdint.h#3 (text+ko) ====

@@ -34,7 +34,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf Exp $
+ *	from: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf
+ * $FreeBSD$
  */
 
 #ifndef _MACHINE__STDINT_H_
@@ -146,7 +147,7 @@
  * 7.18.3  Limits of other integer types
  */
 /* Limits of ptrdiff_t. */
-#define	PTRDIFF_MIN	INT32_MIN	
+#define	PTRDIFF_MIN	INT32_MIN
 #define	PTRDIFF_MAX	INT32_MAX
 
 /* Limits of sig_atomic_t. */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/_types.h#3 (text+ko) ====

@@ -33,7 +33,8 @@
  *
  *	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
  *	From: @(#)types.h	8.3 (Berkeley) 1/5/94
- * $FreeBSD: src/sys/i386/include/_types.h,v 1.12 2005/07/02 23:13:31 thompsa Exp $
+ *	from: src/sys/i386/include/_types.h,v 1.12 2005/07/02 23:13:31 thompsa
+ * $FreeBSD$
  */
 
 #ifndef _MACHINE__TYPES_H_
@@ -43,7 +44,7 @@
 #error this file needs sys/cdefs.h as a prerequisite
 #endif
 
-#define __NO_STRICT_ALIGNMENT
+#define	__NO_STRICT_ALIGNMENT
 
 /*
  * Basic types upon which most other types are built.
@@ -78,9 +79,9 @@
 typedef	__int32_t	__critical_t;
 typedef	double		__double_t;
 typedef	double		__float_t;
-typedef	long    	__intfptr_t;
+typedef	long		__intfptr_t;
 typedef	__int64_t	__intmax_t;
-typedef	long            __intptr_t;
+typedef	long		__intptr_t;
 typedef	__int32_t	__int_fast8_t;
 typedef	__int32_t	__int_fast16_t;
 typedef	__int32_t	__int_fast32_t;
@@ -124,12 +125,12 @@
 #endif /* __GNUCLIKE_BUILTIN_VARARGS */
 #if defined(__GNUC_VA_LIST_COMPATIBILITY) && !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
 
 typedef struct label_t {
-            __register_t val[13];
+	__register_t val[13];
 } label_t;
 
 #endif /* !_MACHINE__TYPES_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/am29lv081b.h#2 (text+ko) ====

@@ -1,71 +1,70 @@
 /*
- * $Id: am29lv081b.h,v 1.1 2006/08/07 05:38:57 katta Exp $
+ * Copyright (c) 2000-2003, 2005, Juniper Networks, Inc.
+ * All rights reserved.
+ * JNPR: am29lv081b.h,v 1.1 2006/08/07 05:38:57 katta
  *
  * am29lv081b.h -- am29lv081b definitions 
  *
  * Chan Lee, May 2000
- *
- * Copyright (c) 2000-2003, 2005, Juniper Networks, Inc.
- * All rights reserved.
  */
-
+// $FreeBSD$
 
 #ifndef __AM29LV081B_H__
-#define __AM29LV081B_H__
+#define	__AM29LV081B_H__
 
 /*
  * Identifiers for the am29lv081b chip
  */
-#define AM29L_MAN_ID 0x01
-#define AM29L_DEV_ID 0x38
+#define	AM29L_MAN_ID 0x01
+#define	AM29L_DEV_ID 0x38
 
-#define AM29L_DEV_ID_OFFSET  0x01
+#define	AM29L_DEV_ID_OFFSET  0x01
 
-#define AM29L_TIMEOUT        3000	/* 3 seconds in ms */
-#define AM29L_ERASE_TIME     30000	/* 30 seconds in ms */
+#define	AM29L_TIMEOUT        3000	/* 3 seconds in ms */
+#define	AM29L_ERASE_TIME     30000	/* 30 seconds in ms */
 
-/* 
+/*
  * This is defined for human consumption.
  */
-#define AM29L_BANNER "AMD29L081B 8Mb flash"
+#define	AM29L_BANNER "AMD29L081B 8Mb flash"
 
 /*
  * Sector definitions.
  */
 
-#define AM29L_SA0 0x00000
-#define AM29L_SA1 0x10000
-#define AM29L_SA2 0x20000
-#define AM29L_SA3 0x30000
-#define AM29L_SA4 0x40000
-#define AM29L_SA5 0x50000
-#define AM29L_SA6 0x60000
-#define AM29L_SA7 0x70000
-#define AM29L_SA8 0x80000
-#define AM29L_SA9 0x90000
-#define AM29L_SA10 0xA0000
-#define AM29L_SA11 0xB0000
-#define AM29L_SA12 0xC0000
-#define AM29L_SA13 0xD0000
-#define AM29L_SA14 0xE0000
-#define AM29L_SA15 0xF0000
+#define	AM29L_SA0	0x00000
+#define	AM29L_SA1	0x10000
+#define	AM29L_SA2	0x20000
+#define	AM29L_SA3	0x30000
+#define	AM29L_SA4	0x40000
+#define	AM29L_SA5	0x50000
+#define	AM29L_SA6	0x60000
+#define	AM29L_SA7	0x70000
+#define	AM29L_SA8	0x80000
+#define	AM29L_SA9	0x90000
+#define	AM29L_SA10	0xA0000
+#define	AM29L_SA11	0xB0000
+#define	AM29L_SA12	0xC0000
+#define	AM29L_SA13	0xD0000
+#define	AM29L_SA14	0xE0000
+#define	AM29L_SA15	0xF0000
 
-#define AM29L_BANK_MASK        0xFFF00000
-#define AM29L_SECTOR_MASK      0xFFFF0000
-#define AM29L_SECTOR_SIZE      0x10000
-#define AM29L_SECTOR_PER_BLK   4
-#define AM29L_TOTAL_SECTORS    16
-#define AM29L_PROTECT_OFFSET   0x2
+#define	AM29L_BANK_MASK		0xFFF00000
+#define	AM29L_SECTOR_MASK	0xFFFF0000
+#define	AM29L_SECTOR_SIZE	0x10000
+#define	AM29L_SECTOR_PER_BLK	4
+#define	AM29L_TOTAL_SECTORS	16
+#define	AM29L_PROTECT_OFFSET	0x2
 
 /*
  * Definitions for the unlock sequence, both
  * the address offset and the data definition.
  */
-#define AM29L_ULCK_ADDR1 0x555
-#define AM29L_ULCK_ADDR2 0x2AA
+#define	AM29L_ULCK_ADDR1 0x555
+#define	AM29L_ULCK_ADDR2 0x2AA
 
-#define AM29L_ULCK_DATA1 0xAA
-#define AM29L_ULCK_DATA2 0x55
+#define	AM29L_ULCK_DATA1 0xAA
+#define	AM29L_ULCK_DATA2 0x55
 
 /*
  * Command definitions for the am29lv081b. Most
@@ -73,12 +72,12 @@
  * after the unlock command sequence.
  */
 
-#define AM29L_CMD_AUTO         0x90
-#define AM29L_CMD_BYTE_PROGRAM 0xA0
-#define AM29L_CMD_ERASE        0x80
-#define AM29L_CMD_ERASE_CHIP   0x10
-#define AM29L_CMD_ERASE_SECT   0x30
-#define AM29L_CMD_RESET        0xF0
+#define	AM29L_CMD_AUTO		0x90
+#define	AM29L_CMD_BYTE_PROGRAM	0xA0
+#define	AM29L_CMD_ERASE		0x80
+#define	AM29L_CMD_ERASE_CHIP	0x10
+#define	AM29L_CMD_ERASE_SECT	0x30
+#define	AM29L_CMD_RESET		0xF0
 
 /*
  * Masks for get the DQ3, DQ5, DQ6, DQ7 bits.
@@ -86,24 +85,25 @@
  * command operations.
  */
 
-#define AM29L_DQ2_MASK 0x04
-#define AM29L_DQ3_MASK 0x08
-#define AM29L_DQ5_MASK 0x20
-#define AM29L_DQ6_MASK 0x40
-#define AM29L_DQ7_MASK 0x80
+#define	AM29L_DQ2_MASK 0x04
+#define	AM29L_DQ3_MASK 0x08
+#define	AM29L_DQ5_MASK 0x20
+#define	AM29L_DQ6_MASK 0x40
+#define	AM29L_DQ7_MASK 0x80
 
-#define AM29L_GET_DQ2(data) ((data & AM29L_DQ2_MASK) >> 2)
-#define AM29L_GET_DQ3(data) ((data & AM29L_DQ3_MASK) >> 3)
-#define AM29L_GET_DQ5(data) ((data & AM29L_DQ5_MASK) >> 5)
-#define AM29L_GET_DQ6(data) ((data & AM29L_DQ6_MASK) >> 6)
-#define AM29L_GET_DQ7(data) ((data & AM29L_DQ7_MASK) >> 7)
+#define	AM29L_GET_DQ2(data) ((data & AM29L_DQ2_MASK) >> 2)
+#define	AM29L_GET_DQ3(data) ((data & AM29L_DQ3_MASK) >> 3)
+#define	AM29L_GET_DQ5(data) ((data & AM29L_DQ5_MASK) >> 5)
+#define	AM29L_GET_DQ6(data) ((data & AM29L_DQ6_MASK) >> 6)
+#define	AM29L_GET_DQ7(data) ((data & AM29L_DQ7_MASK) >> 7)
 
 extern void flash_add_amd29l081b (flash_device_t *dev);
 
 static inline u_int32_t 
 am29f_start_addr_flash(u_int8_t *ptr) 
 {
-    return((u_int32_t)ptr & AM29L_SECTOR_MASK);
+
+	return((u_int32_t)ptr & AM29L_SECTOR_MASK);
 }
 
 #endif /* __AM29LV081B_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/archtype.h#2 (text+ko) ====

@@ -1,8 +1,7 @@
 /*	$OpenBSD: archtype.h,v 1.6 1999/01/27 04:46:04 imp Exp $	*/
 /*
- * $Id: archtype.h,v 1.6 2007/08/09 11:23:32 katta Exp $
  * Copyright (c) 1997 Per Fogelstrom
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -30,18 +29,19 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
+ *	JNPR: archtype.h,v 1.6 2007/08/09 11:23:32 katta
  */
 
 #ifndef _MACHINE_ARCHTYPE_H_
-#define _MACHINE_ARCHTYPE_H_
+#define	_MACHINE_ARCHTYPE_H_
 /*
  * Define architectural identitys for the different Mips machines.
  */
 
 /*
  * FREEBSD_DEVELOPERS_FIXME
- * Define constants for the supported MIPS CPU's 
- */ 
-#define MIPS_CLASS_UNKNOWN	0x00
+ * Define constants for the supported MIPS CPU's
+ */
+#define	MIPS_CLASS_UNKNOWN	0x00
 
 #endif /* !_MACHINE_ARCHTYPE_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#3 (text+ko) ====

@@ -1,7 +1,6 @@
 /*	$NetBSD: asm.h,v 1.29 2000/12/14 21:29:51 jeffs Exp $	*/
 
 /*
- * $Id: asm.h,v 1.10 2007/08/09 11:23:32 katta Exp $
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
@@ -16,10 +15,6 @@
  * 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 University of
- *	California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
@@ -37,6 +32,8 @@
  * SUCH DAMAGE.
  *
  *	@(#)machAsmDefs.h	8.1 (Berkeley) 6/10/93
+ *	JNPR: asm.h,v 1.10 2007/08/09 11:23:32 katta
+ * $FreeBSD$
  */
 
 /*
@@ -57,7 +54,7 @@
  */
 
 #ifndef _MACHINE_ASM_H_
-#define _MACHINE_ASM_H_
+#define	_MACHINE_ASM_H_
 
 #ifndef NO_REG_DEFS
 #include <machine/regdef.h>
@@ -69,57 +66,57 @@
  * Must always be noreorder, must never use a macro instruction
  * Final addiu to t9 must always equal the size of this _KERN_MCOUNT
  */
-#define _KERN_MCOUNT						\
-	.set	push;						\
-	.set	noreorder;					\
-	.set	noat;						\
-	subu	sp,sp,16;					\
-	sw	t9,12(sp);					\
-	move	AT,ra;						\
-	lui	t9,%hi(_mcount); 				\
-	addiu	t9,t9,%lo(_mcount);				\
-	jalr	t9;						\
-	nop;							\
-	lw	t9,4(sp);					\
-	addiu	sp,sp,8;					\
-	addiu	t9,t9,40;					\
-	.set	pop;					
+#define	_KERN_MCOUNT			\
+	.set	push;			\
+	.set	noreorder;		\
+	.set	noat;			\
+	subu	sp,sp,16;		\
+	sw	t9,12(sp);		\
+	move	AT,ra;			\
+	lui	t9,%hi(_mcount);	\
+	addiu	t9,t9,%lo(_mcount);	\
+	jalr	t9;			\
+	nop;				\
+	lw	t9,4(sp);		\
+	addiu	sp,sp,8;		\
+	addiu	t9,t9,40;		\
+	.set	pop;
 
 #ifdef GPROF
-#define MCOUNT _KERN_MCOUNT
+#define	MCOUNT _KERN_MCOUNT
 #else
 #define	MCOUNT
 #endif
 
-#define _C_LABEL(x)	x
+#define	_C_LABEL(x)	x
 
 /* 
  *  Endian-independent assembly-code aliases for unaligned memory accesses.
  */
 #if BYTE_ORDER == LITTLE_ENDIAN
-#define LWLO    lwl 
-#define LWHI    lwr
-#define SWLO    swl
-#define SWHI    swr
-#endif   
+#define	LWLO	lwl
+#define	LWHI	lwr
+#define	SWLO	swl
+#define	SWHI	swr
+#endif
 
 #if BYTE_ORDER == BIG_ENDIAN
-#define LWLO    lwr
-#define LWHI    lwl
-#define SWLO    swr
-#define SWHI    swl 
-#endif 
+#define	LWLO	lwr
+#define	LWHI	lwl
+#define	SWLO	swr
+#define	SWHI	swl
+#endif
 
 #ifdef USE_AENT
-#define AENT(x)				\
+#define	AENT(x)		\
 	.aent	x, 0
 #else
-#define AENT(x)
+#define	AENT(x)
 #endif
 
 #ifdef __ELF__
-#define	WEAK_ALIAS(alias,sym)						\
-	.weak alias;							\
+#define	WEAK_ALIAS(alias,sym)	\
+	.weak alias;		\
 	alias = sym
 #endif
 
@@ -144,30 +141,30 @@
  *	- never use any register that callee-saved (S0-S8), and
  *	- not use any local stack storage.
  */
-#define LEAF(x)				\
-	.globl	_C_LABEL(x);		\
-	.ent	_C_LABEL(x), 0;		\
-_C_LABEL(x): ;				\
-	.frame sp, 0, ra;		\
+#define	LEAF(x)			\
+	.globl	_C_LABEL(x);	\
+	.ent	_C_LABEL(x), 0;	\
+_C_LABEL(x): ;			\
+	.frame sp, 0, ra;	\
 	MCOUNT
 
 /*
  * LEAF_NOPROFILE
  *	No profilable leaf routine.
  */
-#define LEAF_NOPROFILE(x)		\
-	.globl	_C_LABEL(x);		\
-	.ent	_C_LABEL(x), 0;		\
-_C_LABEL(x): ;				\
+#define	LEAF_NOPROFILE(x)	\
+	.globl	_C_LABEL(x);	\
+	.ent	_C_LABEL(x), 0;	\
+_C_LABEL(x): ;			\
 	.frame	sp, 0, ra
 
 /*
  * XLEAF
  *	declare alternate entry to leaf routine
  */
-#define XLEAF(x)			\
-	.globl	_C_LABEL(x);		\
-	AENT (_C_LABEL(x));		\
+#define	XLEAF(x)		\
+	.globl	_C_LABEL(x);	\
+	AENT (_C_LABEL(x));	\
 _C_LABEL(x):
 
 /*
@@ -175,9 +172,9 @@
  *	A function calls other functions and needs
  *	therefore stack space to save/restore registers.
  */
-#define NESTED(x, fsize, retpc)		\
+#define	NESTED(x, fsize, retpc)		\
 	.globl	_C_LABEL(x);		\
-	.ent	_C_LABEL(x), 0; 	\
+	.ent	_C_LABEL(x), 0;		\
 _C_LABEL(x): ;				\
 	.frame	sp, fsize, retpc;	\
 	MCOUNT
@@ -186,39 +183,39 @@
  * NESTED_NOPROFILE(x)
  *	No profilable nested routine.
  */
-#define NESTED_NOPROFILE(x, fsize, retpc)	\
-	.globl	_C_LABEL(x);		\
-	.ent	_C_LABEL(x), 0;		\
-_C_LABEL(x): ;				\
+#define	NESTED_NOPROFILE(x, fsize, retpc)	\
+	.globl	_C_LABEL(x);			\
+	.ent	_C_LABEL(x), 0;			\
+_C_LABEL(x): ;					\
 	.frame	sp, fsize, retpc
 
 /*
  * XNESTED
  *	declare alternate entry point to nested routine.
  */
-#define XNESTED(x)			\
-	.globl	_C_LABEL(x);		\
-	AENT (_C_LABEL(x));		\
+#define	XNESTED(x)		\
+	.globl	_C_LABEL(x);	\
+	AENT (_C_LABEL(x));	\
 _C_LABEL(x):
 
 /*
  * END
  *	Mark end of a procedure.
  */
-#define END(x) \
+#define	END(x)			\
 	.end _C_LABEL(x)
 
 /*
  * IMPORT -- import external symbol
  */
-#define IMPORT(sym, size)		\
+#define	IMPORT(sym, size)	\
 	.extern _C_LABEL(sym),size
 
 /*
  * EXPORT -- export definition of symbol
  */
-#define EXPORT(x)			\
-	.globl	_C_LABEL(x);		\
+#define	EXPORT(x)		\
+	.globl	_C_LABEL(x);	\
 _C_LABEL(x):
 
 /*
@@ -226,34 +223,34 @@
  *	exception vector entrypoint
  *	XXX: regmask should be used to generate .mask
  */
-#define VECTOR(x, regmask)		\
-	.ent	_C_LABEL(x),0;		\
-	EXPORT(x);			\
+#define	VECTOR(x, regmask)	\
+	.ent	_C_LABEL(x),0;	\
+	EXPORT(x);		\
 
 #ifdef __STDC__
-#define VECTOR_END(x)			\
-	EXPORT(x ## End);		\
+#define	VECTOR_END(x)		\
+	EXPORT(x ## End);	\
 	END(x)
 #else
-#define VECTOR_END(x)			\
-	EXPORT(x/**/End);		\
+#define	VECTOR_END(x)		\
+	EXPORT(x/**/End);	\
 	END(x)
 #endif
 
-#define KSEG0TEXT_START
-#define KSEG0TEXT_END
-#define KSEG0TEXT		.text
+#define	KSEG0TEXT_START
+#define	KSEG0TEXT_END
+#define	KSEG0TEXT	.text
 
 /*
  * Macros to panic and printf from assembly language.
  */
-#define PANIC(msg)			\
+#define	PANIC(msg)			\
 	la	a0, 9f;			\
 	jal	_C_LABEL(panic);	\
 	nop;				\
 	MSG(msg)
 
-#define PANIC_KSEG0(msg, reg)	PANIC(msg)
+#define	PANIC_KSEG0(msg, reg)	PANIC(msg)
 
 #define	PRINTF(msg)			\
 	la	a0, 9f;			\
@@ -266,17 +263,17 @@
 9:	.asciiz	msg;			\
 	.text
 
-#define ASMSTR(str)			\
+#define	ASMSTR(str)			\
 	.asciiz str;			\
 	.align	3
 
 /*
  * XXX retain dialects XXX
  */
-#define ALEAF(x)			XLEAF(x)
-#define NLEAF(x)			LEAF_NOPROFILE(x)
-#define NON_LEAF(x, fsize, retpc)	NESTED(x, fsize, retpc)
-#define NNON_LEAF(x, fsize, retpc)	NESTED_NOPROFILE(x, fsize, retpc)
+#define	ALEAF(x)			XLEAF(x)
+#define	NLEAF(x)			LEAF_NOPROFILE(x)
+#define	NON_LEAF(x, fsize, retpc)	NESTED(x, fsize, retpc)
+#define	NNON_LEAF(x, fsize, retpc)	NESTED_NOPROFILE(x, fsize, retpc)
 
 /*
  *  standard callframe {
@@ -288,7 +285,7 @@
 #define	CALLFRAME_SIZ	(4 * (4 + 2))
 #define	CALLFRAME_SP	(4 * 4)
 #define	CALLFRAME_RA	(4 * 5)
-#define START_FRAME	CALLFRAME_SIZ
+#define	START_FRAME	CALLFRAME_SIZ
 
 /*
  * While it would be nice to be compatible with the SGI
@@ -301,112 +298,111 @@
  */
 
 #if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32
-#define	REG_L	lw
-#define REG_S	sw
-#define	REG_LI	li
+#define	REG_L		lw
+#define	REG_S		sw
+#define	REG_LI		li
 #define	REG_PROLOGUE	.set push
 #define	REG_EPILOGUE	.set pop
-#define SZREG	4
+#define	SZREG		4
 #else
-#define	REG_L	ld
-#define REG_S	sd
-#define	REG_LI	dli
+#define	REG_L		ld
+#define	REG_S		sd
+#define	REG_LI		dli
 #define	REG_PROLOGUE	.set push ; .set mips3
 #define	REG_EPILOGUE	.set pop
-#define SZREG	8
+#define	SZREG		8
 #endif	/* _MIPS_BSD_API */
 
-#define mfc0_macro(data, spr)                                           \
-    asm volatile ("mfc0 %0, $%1"                                        \
-                  : "=r" (data)                 /* outputs */           \
-                  : "i" (spr));                 /* inputs */
+#define	mfc0_macro(data, spr)						\
+	asm volatile ("mfc0 %0, $%1"					\
+			: "=r" (data)	/* outputs */			\
+			: "i" (spr));	/* inputs */
 
-#define mtc0_macro(data, spr)                                           \
-    asm volatile ("mtc0 %0, $%1"                                        \
-                  :                             /* outputs */           \
-                  : "r" (data), "i" (spr));     /* inputs */
+#define	mtc0_macro(data, spr)						\
+	asm volatile ("mtc0 %0, $%1"					\
+			:				/* outputs */	\
+			: "r" (data), "i" (spr));	/* inputs */
 
-#define cfc0_macro(data, spr)                                           \
-    asm volatile ("cfc0 %0, $%1"                                        \
-                  : "=r" (data)                 /* outputs */           \
-                  : "i" (spr));                 /* inputs */
+#define	cfc0_macro(data, spr)						\
+	asm volatile ("cfc0 %0, $%1"					\
+			: "=r" (data)	/* outputs */			\
+			: "i" (spr));	/* inputs */
 
+#define	ctc0_macro(data, spr)						\
+	asm volatile ("ctc0 %0, $%1"					\
+			:				/* outputs */	\
+			: "r" (data), "i" (spr));	/* inputs */
 
-#define ctc0_macro(data, spr)                                           \
-    asm volatile ("ctc0 %0, $%1"                                        \
-                  :                             /* outputs */           \
-                  : "r" (data), "i" (spr));     /* inputs */
 
+#define	lbu_macro(data, addr)						\
+	asm volatile ("lbu %0, 0x0(%1)"					\
+			: "=r" (data)	/* outputs */			\
+			: "r" (addr));	/* inputs */
 
-#define lbu_macro(data, addr)                                           \
-    asm volatile ("lbu		%0, 0x0(%1)"                            \
-                  : "=r" (data)                 /* outputs */           \
-                  : "r" (addr));                /* inputs */
+#define	lb_macro(data, addr)						\
+	asm volatile ("lb %0, 0x0(%1)"					\
+			: "=r" (data)	/* outputs */			\
+			: "r" (addr));	/* inputs */
 
-#define lb_macro(data, addr)                                            \
-    asm volatile ("lb		%0, 0x0(%1)"                            \
-                  : "=r" (data)                 /* outputs */           \
-                  : "r" (addr));                /* inputs */
+#define	lwl_macro(data, addr)						\
+	asm volatile ("lwl %0, 0x0(%1)"					\
+			: "=r" (data)	/* outputs */			\
+			: "r" (addr));	/* inputs */
 
-#define lwl_macro(data, addr)                                           \
-    asm volatile ("lwl		%0, 0x0(%1)"                            \
-                  : "=r" (data)                 /* outputs */           \
-                  : "r" (addr));                /* inputs */
+#define	lwr_macro(data, addr)						\
+	asm volatile ("lwr %0, 0x0(%1)"					\
+			: "=r" (data)	/* outputs */			\
+			: "r" (addr));	/* inputs */
 
-#define lwr_macro(data, addr)                                           \
-    asm volatile ("lwr		%0, 0x0(%1)"                            \
-                  : "=r" (data)                 /* outputs */           \
-                  : "r" (addr));                /* inputs */
+#define	ldl_macro(data, addr)						\
+	asm volatile ("ldl %0, 0x0(%1)"					\
+			: "=r" (data)	/* outputs */			\
+			: "r" (addr));	/* inputs */
 
-#define ldl_macro(data, addr)                                           \
-    asm volatile ("ldl		%0, 0x0(%1)"                            \
-                  : "=r" (data)                 /* outputs */           \
-                  : "r" (addr));                /* inputs */
+#define	ldr_macro(data, addr)						\
+	asm volatile ("ldr %0, 0x0(%1)"					\
+			: "=r" (data)	/* outputs */			\
+			: "r" (addr));	/* inputs */
 
-#define ldr_macro(data, addr)                                           \
-    asm volatile ("ldr		%0, 0x0(%1)"                            \
-                  : "=r" (data)                 /* outputs */           \
-                  : "r" (addr));                /* inputs */
+#define	sb_macro(data, addr)						\
+	asm volatile ("sb %0, 0x0(%1)"					\
+			:				/* outputs */	\
+			: "r" (data), "r" (addr));	/* inputs */
 
-#define sb_macro(data, addr)                                            \
-    asm volatile ("sb		%0, 0x0(%1)"                            \
-                  : 				/* outputs */		\
-                  : "r" (data), "r" (addr));	/* inputs */
+#define	swl_macro(data, addr)						\
+	asm volatile ("swl %0, 0x0(%1)"					\
+			: 				/* outputs */	\
+			: "r" (data), "r" (addr));	/* inputs */
 
-#define swl_macro(data, addr)                                           \
-    asm volatile ("swl		%0, 0x0(%1)"                            \
-                  : 				/* outputs */		\
-                  : "r" (data), "r" (addr));	/* inputs */
+#define	swr_macro(data, addr)						\
+	asm volatile ("swr %0, 0x0(%1)"					\
+			: 				/* outputs */	\
+			: "r" (data), "r" (addr));	/* inputs */
 
-#define swr_macro(data, addr)                                           \
-    asm volatile ("swr		%0, 0x0(%1)"                            \
-                  : 				/* outputs */		\
-                  : "r" (data), "r" (addr));	/* inputs */
+#define	sdl_macro(data, addr)						\
+	asm volatile ("sdl %0, 0x0(%1)"					\
+			: 				/* outputs */	\
+			: "r" (data), "r" (addr));	/* inputs */
 
-#define sdl_macro(data, addr)                                           \
-    asm volatile ("sdl		%0, 0x0(%1)"                            \
-                  : 				/* outputs */		\
-                  : "r" (data), "r" (addr));	/* inputs */
+#define	sdr_macro(data, addr)						\
+	asm volatile ("sdr %0, 0x0(%1)"					\
+			:				/* outputs */	\
+			: "r" (data), "r" (addr));	/* inputs */
 
-#define sdr_macro(data, addr)                                           \
-    asm volatile ("sdr		%0, 0x0(%1)"                            \
-                  : 				/* outputs */		\
-                  : "r" (data), "r" (addr));	/* inputs */
+#define	mfgr_macro(data, gr)						\
+	asm volatile ("move %0, $%1"					\
+			: "=r" (data)	/* outputs */			\
+			: "i" (gr));	/* inputs */
 
-#define mfgr_macro(data, gr)						\
-    asm volatile ("move %0, $%1"					\
-		  : "=r" (data)	/* outputs */				\
-		  : "i" (gr));	/* inputs */
+#define	dmfc0_macro(data, spr)						\
+	asm volatile ("dmfc0 %0, $%1"					\
+			: "=r" (data)	/* outputs */			\
+			: "i" (spr));	/* inputs */
 
-#define dmfc0_macro(data, spr)                                          \
-    asm volatile ("dmfc0	%0, $%1"                                \
-                  : "=r" (data)                 /* outputs */           \
-                  : "i" (spr));                 /* inputs */
-
-#define dmtc0_macro(data, spr, sel)						    \
-    asm volatile ("dmtc0	%0, $%1, %2"				            \
-                  :					    /* no  outputs */       \
-                  : "r" (data), "i" (spr), "i" (sel));      /* inputs      */
+#define	dmtc0_macro(data, spr, sel)					\
+	asm volatile ("dmtc0	%0, $%1, %2"				\
+			:			/* no  outputs */	\
+			: "r" (data), "i" (spr), "i" (sel)); /* inputs */
 
 /*
  * The DYNAMIC_STATUS_MASK option adds an additional masking operation
@@ -419,28 +415,26 @@
  * XXX this is only currently implemented for mips3.
  */
 #ifdef MIPS_DYNAMIC_STATUS_MASK
-#define DYNAMIC_STATUS_MASK(sr,scratch)	\
-	lw	scratch, mips_dynamic_status_mask; \
+#define	DYNAMIC_STATUS_MASK(sr,scratch)			\
+	lw	scratch, mips_dynamic_status_mask;	\
 	and	sr, sr, scratch
 
-#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1)		\
+#define	DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1)		\
 	ori	sr, (MIPS_INT_MASK | MIPS_SR_INT_IE);	\
 	DYNAMIC_STATUS_MASK(sr,scratch1)
 #else
-#define DYNAMIC_STATUS_MASK(sr,scratch)
-#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1)
+#define	DYNAMIC_STATUS_MASK(sr,scratch)
+#define	DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1)
 #endif
 
 #ifdef SMP
-    /*
-     * FREEBSD_DEVELOPERS_FIXME
-     * In multiprocessor case, store/retrieve the pcpu structure
-     * address for current CPU in scratch register for fast access.
-     */
-
-
+	/*
+	 * FREEBSD_DEVELOPERS_FIXME
+	 * In multiprocessor case, store/retrieve the pcpu structure
+	 * address for current CPU in scratch register for fast access.
+	 */
 #else
-#define GET_CPU_PCPU(reg)		\
+#define	GET_CPU_PCPU(reg)		\
 	lw	reg, _C_LABEL(pcpup);
 #endif
 

==== //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#3 (text+ko) ====

@@ -23,7 +23,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/alpha/include/atomic.h,v 1.21.2.3 2005/10/06 18:12:05 jhb Exp $
+ *	from: src/sys/alpha/include/atomic.h,v 1.21.2.3 2005/10/06 18:12:05 jhb
+ * $FreeBSD$

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list