Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2002 13:13:56 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 11135 for review
Message-ID:  <200205102013.g4AKDuS00851@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11135

Change 11135 by peter@peter_overcee on 2002/05/10 13:13:22

	IFC @11134

Affected files ...

... //depot/projects/ia64/contrib/gcc/config/freebsd-spec.h#2 integrate
... //depot/projects/ia64/gnu/usr.bin/Makefile#13 integrate
... //depot/projects/ia64/gnu/usr.bin/cc/Makefile.tgt#5 integrate
... //depot/projects/ia64/gnu/usr.bin/cc/cc_tools/Makefile#9 integrate
... //depot/projects/ia64/lib/libc/stdlib/malloc.c#10 integrate
... //depot/projects/ia64/sys/alpha/pci/irongate_pci.c#3 integrate
... //depot/projects/ia64/sys/fs/devfs/devfs_vnops.c#9 integrate
... //depot/projects/ia64/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c#5 integrate
... //depot/projects/ia64/sys/isa/fd.c#5 integrate
... //depot/projects/ia64/sys/isa/fdreg.h#3 integrate
... //depot/projects/ia64/sys/net/if_spppsubr.c#5 integrate
... //depot/projects/ia64/sys/powerpc/powerpc/machdep.c#10 integrate
... //depot/projects/ia64/sys/powerpc/powerpc/pmap.c#10 integrate
... //depot/projects/ia64/sys/sys/proc.h#16 integrate
... //depot/projects/ia64/usr.bin/xargs/Makefile#3 integrate
... //depot/projects/ia64/usr.bin/xargs/xargs.c#12 integrate

Differences ...

==== //depot/projects/ia64/contrib/gcc/config/freebsd-spec.h#2 (text+ko) ====

@@ -18,6 +18,8 @@
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.2 2002/05/10 19:05:07 obrien Exp $ */
+
 /* Common FreeBSD configuration. 
    All FreeBSD architectures should include this file, which will specify
    their commonalities.
@@ -48,6 +50,10 @@
    || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") 		\
    || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker"))
 
+
+#ifndef FREEBSD_NATIVE	/* these bits are here to reduce merge diffs, but I don't want to acutally use the bits right now */
+
+
 #if FBSD_MAJOR == 6
 #define FBSD_CPP_PREDEFINES \
   "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
@@ -73,11 +79,24 @@
   "-D__FreeBSD__   -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
 #endif
 
+
+#else	/* FREEBSD_NATIVE */
+/* Place spaces around this string.  We depend on string splicing to produce
+   the final CPP_PREDEFINES value.  */
+
+#define FBSD_CPP_PREDEFINES \
+  "-D__FreeBSD__=5 -D__FreeBSD_cc_version=500003 -Dunix -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+#endif	/* ! FREEBSD_NATIVE */
+
+
 /* Provide a CPP_SPEC appropriate for FreeBSD.  We just deal with the GCC 
    option `-posix', and PIC issues.  */
 
 #define FBSD_CPP_SPEC "							\
   %(cpp_cpu)								\
+  %{!maout: -D__ELF__}							\
+  %{munderscores: -D__UNDERSCORES__}					\
+  %{maout: %{!mno-underscores: -D__UNDERSCORES__}}			\
   %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}		\
   %{posix:-D_POSIX_SOURCE}"
 
@@ -129,7 +148,8 @@
     %{pg:  -lc_p}							\
   }"
 #else
-#if FBSD_MAJOR >= 5
+#include <sys/param.h>
+#if __FreeBSD_version >= 500016
 #define FBSD_LIB_SPEC "							\
   %{!shared:								\
     %{!pg: %{pthread:-lc_r} -lc}					\

==== //depot/projects/ia64/gnu/usr.bin/Makefile#13 (text+ko) ====

@@ -1,6 +1,6 @@
-# $FreeBSD: src/gnu/usr.bin/Makefile,v 1.64 2002/05/10 00:50:43 obrien Exp $
+# $FreeBSD: src/gnu/usr.bin/Makefile,v 1.65 2002/05/10 17:30:42 obrien Exp $
 
-SUBDIR= awk bc binutils cpio dc dialog diff diff3 \
+SUBDIR= awk bc binutils cc cpio dc dialog diff diff3 \
 	grep gzip man patch ptx rcs sdiff send-pr sort tar texinfo
 
 .if ${CXX:T} != "c++"
@@ -17,10 +17,6 @@
 .endif
 .endif
 
-.if ${MACHINE_ARCH} != "sparc64"
-SUBDIR+=cc
-.endif
-
 .if !defined(NOPERL) && !defined(NO_PERL) && exists(${.CURDIR}/perl)
 SUBDIR+=perl
 .endif

==== //depot/projects/ia64/gnu/usr.bin/cc/Makefile.tgt#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/usr.bin/cc/Makefile.tgt,v 1.3 2002/05/10 08:54:43 obrien Exp $
+# $FreeBSD: src/gnu/usr.bin/cc/Makefile.tgt,v 1.4 2002/05/10 17:23:04 obrien Exp $
 
 TARGET_ARCH?=	${MACHINE_ARCH}
 

==== //depot/projects/ia64/gnu/usr.bin/cc/cc_tools/Makefile#9 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.59 2002/05/10 10:21:19 obrien Exp $
+# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.60 2002/05/10 17:42:19 obrien Exp $
 
 #
 # This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk

==== //depot/projects/ia64/lib/libc/stdlib/malloc.c#10 (text+ko) ====

@@ -9,7 +9,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.68 2002/04/24 16:49:36 phk Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.69 2002/05/10 12:50:59 peter Exp $");
 
 /*
  * Defining EXTRA_SANITY will enable extra checks which are related

==== //depot/projects/ia64/sys/alpha/pci/irongate_pci.c#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/alpha/pci/irongate_pci.c,v 1.7 2002/02/28 18:18:41 gallatin Exp $
+ * $FreeBSD: src/sys/alpha/pci/irongate_pci.c,v 1.8 2002/05/10 16:56:14 gallatin Exp $
  */
 
 #include <sys/param.h>
@@ -132,7 +132,7 @@
 		irongate_check_abort();			\
 		return ~0;				\
 	}						\
-	data = ##op##(va);				\
+	data = op(va);					\
 	if (irongate_check_abort())			\
 		return ~0;				\
 	return data;					\
@@ -144,7 +144,7 @@
 	irongate_clear_abort();				\
 	if (badaddr((caddr_t)va, width))		\
 		return;					\
-	##op##(va, data);				\
+	op(va, data);					\
 	irongate_check_abort();				\
 } while (0)
 

==== //depot/projects/ia64/sys/fs/devfs/devfs_vnops.c#9 (text+ko) ====

@@ -31,7 +31,7 @@
  *	@(#)kernfs_vnops.c	8.15 (Berkeley) 5/21/95
  * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
  *
- * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.38 2002/04/29 20:00:39 rwatson Exp $
+ * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.39 2002/05/10 15:41:14 mux Exp $
  */
 
 /*
@@ -276,7 +276,7 @@
 	
 	*vpp = NULLVP;
 
-	if (nameiop == RENAME)
+	if ((flags & ISLASTCN) && nameiop == RENAME)
 		return (EOPNOTSUPP);
 
 	if (dvp->v_type != VDIR)
@@ -290,7 +290,7 @@
 		return (error);
 
 	if (cnp->cn_namelen == 1 && *pname == '.') {
-		if (nameiop != LOOKUP)
+		if ((flags & ISLASTCN) && nameiop != LOOKUP)
 			return (EINVAL);
 		*vpp = dvp;
 		VREF(dvp);
@@ -298,7 +298,7 @@
 	}
 
 	if (flags & ISDOTDOT) {
-		if (nameiop != LOOKUP)
+		if ((flags & ISLASTCN) && nameiop != LOOKUP)
 			return (EINVAL);
 		VOP_UNLOCK(dvp, 0, td);
 		de = TAILQ_FIRST(&dd->de_dlist);	/* "." */

==== //depot/projects/ia64/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c#5 (text+ko) ====

@@ -35,7 +35,7 @@
  *
  *	$Id$
  *
- * $FreeBSD: src/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c,v 1.7 2002/04/28 11:47:10 gj Exp $
+ * $FreeBSD: src/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c,v 1.8 2002/05/10 12:04:04 gj Exp $
  *
  *
  *---------------------------------------------------------------------------*/
@@ -953,8 +953,8 @@
 	bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
 	bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]); 
 
-	/* could be wrong */
-	bus_space_write_1(btag, bhandle, STAT0_OFFSET, 0x07);
+	/* could be still be wrong, but seems to prevent hangs */
+	bus_space_write_1(btag, bhandle, STAT0_OFFSET, 0x00);
 }
 
 static void

==== //depot/projects/ia64/sys/isa/fd.c#5 (text+ko) ====

@@ -50,7 +50,7 @@
  * SUCH DAMAGE.
  *
  *	from:	@(#)fd.c	7.4 (Berkeley) 5/25/91
- * $FreeBSD: src/sys/isa/fd.c,v 1.228 2002/04/02 18:29:43 joerg Exp $
+ * $FreeBSD: src/sys/isa/fd.c,v 1.229 2002/05/10 17:56:39 joerg Exp $
  */
 
 #include "opt_fdc.h"
@@ -563,13 +563,15 @@
 			return fdc_err(fdc, "Enable FIFO failed\n");
 		
 		/* If command is invalid, return */
-		j = 100000;
+		j = FDSTS_TIMEOUT;
 		while ((i = fdsts_rd(fdc) & (NE7_DIO | NE7_RQM))
-		       != NE7_RQM && j-- > 0)
+		       != NE7_RQM && j-- > 0) {
 			if (i == (NE7_DIO | NE7_RQM)) {
 				fdc_reset(fdc);
 				return FD_FAILED;
 			}
+			DELAY(1);
+		}
 		if (j<0 || 
 		    fd_cmd(fdc, 3,
 			   0, (fifo_threshold - 1) & 0xf, 0, 0) < 0) {
@@ -1473,11 +1475,13 @@
 static int
 fd_in(struct fdc_data *fdc, int *ptr)
 {
-	int i, j = 100000;
+	int i, j = FDSTS_TIMEOUT;
 	while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM))
-		!= (NE7_DIO|NE7_RQM) && j-- > 0)
+		!= (NE7_DIO|NE7_RQM) && j-- > 0) {
 		if (i == NE7_RQM)
 			return fdc_err(fdc, "ready for output in input\n");
+		DELAY(1);
+	}
 	if (j <= 0)
 		return fdc_err(fdc, bootverbose? "input ready timeout\n": 0);
 #ifdef	FDC_DEBUG
@@ -1499,13 +1503,15 @@
 	int i;
 
 	/* Check that the direction bit is set */
-	i = 100000;
-	while ((fdsts_rd(fdc) & NE7_DIO) && i-- > 0);
+	i = FDSTS_TIMEOUT;
+	while ((fdsts_rd(fdc) & NE7_DIO) && i-- > 0)
+		DELAY(1);
 	if (i <= 0) return fdc_err(fdc, "direction bit not set\n");
 
 	/* Check that the floppy controller is ready for a command */
-	i = 100000;
-	while ((fdsts_rd(fdc) & NE7_RQM) == 0 && i-- > 0);
+	i = FDSTS_TIMEOUT;
+	while ((fdsts_rd(fdc) & NE7_RQM) == 0 && i-- > 0)
+		DELAY(1);
 	if (i <= 0)
 		return fdc_err(fdc, bootverbose? "output ready timeout\n": 0);
 

==== //depot/projects/ia64/sys/isa/fdreg.h#3 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)fdreg.h	7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/isa/fdreg.h,v 1.15 2001/12/15 19:07:58 joerg Exp $
+ * $FreeBSD: src/sys/isa/fdreg.h,v 1.16 2002/05/10 17:56:39 joerg Exp $
  */
 
 /*
@@ -69,3 +69,15 @@
 #define	FDI_DCHG	0x80	/* diskette has been changed */
 				/* requires drive and motor being selected */
 				/* is cleared by any step pulse to drive */
+
+/*
+ * Timeout value for the PIO loops to wait until the FDC main status
+ * register matches our expextations (request for master, direction
+ * bit).  This is the number of cycles to loop while waiting, with a
+ * 1-microsecond (in theory) DELAY() in each cycle.  In particular on
+ * slower hardware, it could take a fair amount more to execute.  Of
+ * course, as soon as the FDC main status register indicates the correct
+ * bits are set, the loop will terminate, so this is merely a safety
+ * measure to avoid looping forever in case of broken hardware.
+ */
+#define	FDSTS_TIMEOUT	200

==== //depot/projects/ia64/sys/net/if_spppsubr.c#5 (text+ko) ====

@@ -17,7 +17,7 @@
  *
  * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
  *
- * $FreeBSD: src/sys/net/if_spppsubr.c,v 1.93 2002/05/01 04:18:36 obrien Exp $
+ * $FreeBSD: src/sys/net/if_spppsubr.c,v 1.94 2002/05/10 12:48:09 joerg Exp $
  */
 
 #include <sys/param.h>
@@ -5145,8 +5145,8 @@
 			sp->confflags |= CONF_ENABLE_IPV6;
 		else
 			sp->confflags &= ~CONF_ENABLE_IPV6;
+#endif
 		break;
-#endif
 
 	default:
 		rv = EINVAL;

==== //depot/projects/ia64/sys/powerpc/powerpc/machdep.c#10 (text+ko) ====

@@ -56,7 +56,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$FreeBSD: src/sys/powerpc/powerpc/machdep.c,v 1.28 2002/04/09 11:18:46 phk Exp $";
+  "$FreeBSD: src/sys/powerpc/powerpc/machdep.c,v 1.29 2002/05/10 14:19:44 benno Exp $";
 #endif /* not lint */
 
 #include "opt_ddb.h"
@@ -349,6 +349,7 @@
 	bcopy(&decrint, (void *)EXC_DECR, (size_t)&decrsize);
 	bcopy(&dsitrap, (void *)EXC_DSI, (size_t)&dsisize);
 	bcopy(&isitrap, (void *)EXC_ISI, (size_t)&isisize);
+	bcopy(&trapcode, (void *)EXC_SC, (size_t)&trapsize);
 
 	/*
 	 * Start initializing proc0 and thread0.

==== //depot/projects/ia64/sys/powerpc/powerpc/pmap.c#10 (text+ko) ====

@@ -92,7 +92,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$FreeBSD: src/sys/powerpc/powerpc/pmap.c,v 1.34 2002/05/10 06:27:08 benno Exp $";
+  "$FreeBSD: src/sys/powerpc/powerpc/pmap.c,v 1.35 2002/05/10 14:21:48 benno Exp $";
 #endif /* not lint */
 
 /*
@@ -774,14 +774,28 @@
 vm_offset_t
 pmap_addr_hint(vm_object_t object, vm_offset_t va, vm_size_t size)
 {
-	TODO;
-	return (0);
+
+	return (va);
 }
 
 void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
+pmap_change_wiring(pmap_t pm, vm_offset_t va, boolean_t wired)
 {
-	TODO;
+	struct	pvo_entry *pvo;
+
+	pvo = pmap_pvo_find_va(pm, va & ~ADDR_POFF, NULL);
+
+	if (pvo != NULL) {
+		if (wired) {
+			if ((pvo->pvo_vaddr & PVO_WIRED) == 0)
+				pm->pm_stats.wired_count++;
+			pvo->pvo_vaddr |= PVO_WIRED;
+		} else {
+			if ((pvo->pvo_vaddr & PVO_WIRED) != 0)
+				pm->pm_stats.wired_count--;
+			pvo->pvo_vaddr &= ~PVO_WIRED;
+		}
+	}
 }
 
 void
@@ -934,9 +948,16 @@
 }
 
 vm_offset_t
-pmap_extract(pmap_t pmap, vm_offset_t va)
+pmap_extract(pmap_t pm, vm_offset_t va)
 {
-	TODO;
+	struct	pvo_entry *pvo;
+
+	pvo = pmap_pvo_find_va(pm, va & ~ADDR_POFF, NULL);
+
+	if (pvo != NULL) {
+		return ((pvo->pvo_pte.pte_lo & PTE_RPGN) | (va & ADDR_POFF));
+	}
+
 	return (0);
 }
 
@@ -975,8 +996,11 @@
 boolean_t
 pmap_is_modified(vm_page_t m)
 {
-	TODO;
-	return (0);
+
+	if (m->flags & PG_FICTITIOUS)
+		return (FALSE);
+
+	return (pmap_query_bit(m, PTE_CHG));
 }
 
 void

==== //depot/projects/ia64/sys/sys/proc.h#16 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)proc.h	8.15 (Berkeley) 5/19/95
- * $FreeBSD: src/sys/sys/proc.h,v 1.219 2002/05/09 04:13:41 mini Exp $
+ * $FreeBSD: src/sys/sys/proc.h,v 1.220 2002/05/10 14:28:05 jhb Exp $
  */
 
 #ifndef _SYS_PROC_H_
@@ -451,7 +451,7 @@
 	u_short		p_acflag;	/* (c) Accounting flags. */
 	struct rusage	*p_ru;		/* (a) Exit information. XXX */
 	struct proc	*p_peers;	/* (c) */
-	struct proc	*p_leader;	/* (c) */
+	struct proc	*p_leader;	/* (b) */
 	void		*p_emuldata;	/* (c) Emulator state data. */
 };
 

==== //depot/projects/ia64/usr.bin/xargs/Makefile#3 (text+ko) ====

@@ -1,8 +1,12 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/6/93
-# $FreeBSD: src/usr.bin/xargs/Makefile,v 1.3 2002/04/19 23:46:45 jmallett Exp $
+# $FreeBSD: src/usr.bin/xargs/Makefile,v 1.4 2002/05/10 13:06:34 ru Exp $
 
 PROG=	xargs
 SRCS=	xargs.c strnsubst.c
 WARNS?=	4
 
+.if defined(BOOTSTRAPPING)
+CFLAGS+=-DBOOTSTRAPPING
+.endif
+
 .include <bsd.prog.mk>

==== //depot/projects/ia64/usr.bin/xargs/xargs.c#12 (text+ko) ====

@@ -49,14 +49,16 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/xargs/xargs.c,v 1.34 2002/05/06 03:38:28 jmallett Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/xargs/xargs.c,v 1.35 2002/05/10 13:06:34 ru Exp $");
 
 #include <sys/types.h>
 #include <sys/wait.h>
 
 #include <err.h>
 #include <errno.h>
+#ifndef BOOTSTRAPPING
 #include <langinfo.h>
+#endif
 #include <locale.h>
 #include <paths.h>
 #include <regex.h>
@@ -536,7 +538,13 @@
 	(void)fprintf(stderr, "?...");
 	(void)fflush(stderr);
 	if ((response = fgetln(ttyfp, &rsize)) == NULL ||
-	    regcomp(&cre, nl_langinfo(YESEXPR), REG_BASIC) != 0) {
+	    regcomp(&cre,
+#ifdef BOOTSTRAPPING
+		"^[yY]",
+#else
+		nl_langinfo(YESEXPR),
+#endif
+		REG_BASIC) != 0) {
 		(void)fclose(ttyfp);
 		return (0);
 	}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205102013.g4AKDuS00851>