PERFORCE change 34288 for review

Marcel Moolenaar marcel at FreeBSD.org
Wed Jul 9 22:06:16 PDT 2003


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

Change 34288 by marcel at marcel_nfs on 2003/07/09 22:05:26

	IFC @34286

Affected files ...

.. //depot/projects/ia64/etc/pam.d/su#11 integrate
.. //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#16 integrate
.. //depot/projects/ia64/lib/libpthread/thread/thr_sigwait.c#9 integrate
.. //depot/projects/ia64/libexec/ftpd/ftpcmd.y#17 integrate
.. //depot/projects/ia64/libexec/ftpd/ftpd.c#21 integrate
.. //depot/projects/ia64/release/doc/ja_JP.eucJP/relnotes/common/new.sgml#26 integrate
.. //depot/projects/ia64/share/man/man4/amr.4#3 integrate
.. //depot/projects/ia64/sys/amd64/amd64/pmap.c#11 integrate
.. //depot/projects/ia64/sys/amd64/include/pmap.h#5 integrate
.. //depot/projects/ia64/sys/amd64/include/vmparam.h#3 integrate
.. //depot/projects/ia64/sys/conf/files#86 integrate
.. //depot/projects/ia64/sys/conf/options.i386#19 integrate
.. //depot/projects/ia64/sys/conf/options.pc98#20 integrate
.. //depot/projects/ia64/sys/dev/aac/aac.c#27 integrate
.. //depot/projects/ia64/sys/dev/aac/aac_pci.c#20 integrate
.. //depot/projects/ia64/sys/dev/aac/aacvar.h#17 integrate
.. //depot/projects/ia64/sys/dev/acpica/acpi_isab.c#2 integrate
.. //depot/projects/ia64/sys/dev/firewire/firewire.c#33 integrate
.. //depot/projects/ia64/sys/dev/usb/uscanner.c#11 integrate
.. //depot/projects/ia64/sys/i386/i386/mp_machdep.c#24 integrate
.. //depot/projects/ia64/sys/i386/i386/pmap.c#50 integrate
.. //depot/projects/ia64/sys/i386/i386/swtch.s#11 integrate
.. //depot/projects/ia64/sys/i386/isa/apic_vector.s#9 integrate
.. //depot/projects/ia64/sys/kern/kern_synch.c#41 integrate
.. //depot/projects/ia64/sys/kern/subr_witness.c#36 integrate
.. //depot/projects/ia64/sys/kern/sys_pipe.c#34 integrate
.. //depot/projects/ia64/sys/pci/if_dc.c#40 integrate
.. //depot/projects/ia64/sys/pci/if_dcreg.h#14 integrate
.. //depot/projects/ia64/sys/sparc64/conf/GENERIC#37 integrate
.. //depot/projects/ia64/sys/sys/vnode.h#31 integrate

Differences ...

==== //depot/projects/ia64/etc/pam.d/su#11 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/etc/pam.d/su,v 1.15 2003/06/14 12:35:05 des Exp $
+# $FreeBSD: src/etc/pam.d/su,v 1.16 2003/07/09 18:40:49 des Exp $
 #
 # PAM configuration for the "su" service
 #
@@ -14,4 +14,4 @@
 account		include		system
 
 # session
-session		include		system
+session		required	pam_permit.so

==== //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#16 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/thread/thr_sig.c,v 1.59 2003/07/09 01:39:24 davidxu Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_sig.c,v 1.61 2003/07/09 22:30:55 davidxu Exp $
  */
 #include <sys/param.h>
 #include <sys/types.h>
@@ -217,7 +217,10 @@
 		    THR_IS_EXITING(thread) || THR_IS_SUSPENDED(thread)) {
 			KSE_SCHED_UNLOCK(curkse, thread->kseg);
 			_thr_ref_delete(NULL, thread);
-		} else if (SIGISMEMBER(thread->sigmask, sig)) {
+		} else if ((thread->state == PS_SIGWAIT &&
+			    SIGISMEMBER(thread->oldsigmask, sig)) ||
+			   (thread->state != PS_SIGWAIT &&
+			    SIGISMEMBER(thread->sigmask, sig))) {
 			KSE_SCHED_UNLOCK(curkse, thread->kseg);
 			_thr_ref_delete(NULL, thread);
 		} else {
@@ -415,10 +418,10 @@
 		if ((pthread->state == PS_DEAD)		||
 		    (pthread->state == PS_DEADLOCK)	||
 		    THR_IS_EXITING(pthread)		||
-		    THR_IS_SUSPENDED(pthread)		||
-		    SIGISMEMBER(pthread->sigmask, sig)) {
+		    THR_IS_SUSPENDED(pthread)) {
 			; /* Skip this thread. */
-		} else if (pthread->state == PS_SIGWAIT) {
+		} else if (pthread->state == PS_SIGWAIT &&
+			   !SIGISMEMBER(pthread->sigmask, sig)) {
 			/*
 			 * retrieve signal from kernel, if it is job control
 			 * signal, and sigaction is SIG_DFL, then we will
@@ -447,7 +450,9 @@
 			 */
 			KSE_LOCK_RELEASE(curkse, &_thread_list_lock);
 			return (NULL);
-		} else  {
+		} else if (!SIGISMEMBER(pthread->sigmask, sig) ||
+			(!SIGISMEMBER(pthread->oldsigmask, sig) &&
+			 pthread->state == PS_SIGWAIT)) {
 			if (pthread->state == PS_SIGSUSPEND) {
 				if (suspended_thread == NULL) {
 					suspended_thread = pthread;
@@ -490,6 +495,8 @@
 _thr_sig_rundown(struct pthread *curthread, ucontext_t *ucp,
     struct pthread_sigframe *psf)
 {
+	int interrupted = curthread->interrupted;
+	int timeout = curthread->timeout;
 	siginfo_t siginfo;
 	int i;
 	kse_critical_t crit;
@@ -563,6 +570,9 @@
 	KSE_SCHED_UNLOCK(curkse, curkse->k_kseg);
 	_kse_critical_leave(&curthread->tmbx);
 
+	curthread->interrupted = interrupted;
+	curthread->timeout = timeout;
+
 	DBG_MSG("<<< thr_sig_rundown %p\n", curthread);
 }
 
@@ -659,7 +669,8 @@
 #endif
 
 	if (pthread->curframe == NULL ||
-	    SIGISMEMBER(pthread->sigmask, sig) ||
+	    (pthread->state != PS_SIGWAIT &&
+	    SIGISMEMBER(pthread->sigmask, sig)) ||
 	    THR_IN_CRITICAL(pthread)) {
 		/* thread is running or signal was being masked */
 		if (!fromproc) {
@@ -759,7 +770,12 @@
 			} else {
 				/* Increment the pending signal count. */
 				SIGADDSET(pthread->sigpend, sig);
-				pthread->check_pending = 1;
+				if (!SIGISMEMBER(pthread->oldsigmask, sig)) {
+					pthread->check_pending = 1;
+					pthread->interrupted = 1;
+					pthread->sigmask = pthread->oldsigmask;
+					_thr_setrunnable_unlocked(pthread);
+				}
 			}
 		
 			return;
@@ -822,7 +838,12 @@
 		} else {
 			/* Increment the pending signal count. */
 			SIGADDSET(pthread->sigpend, sig);
-			pthread->check_pending = 1;
+			if (!SIGISMEMBER(pthread->oldsigmask, sig)) {
+				pthread->check_pending = 1;
+				pthread->interrupted = 1;
+				pthread->sigmask = pthread->oldsigmask;
+				_thr_setrunnable_unlocked(pthread);
+			}
 		}
 		break;
 

==== //depot/projects/ia64/lib/libpthread/thread/thr_sigwait.c#9 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/thread/thr_sigwait.c,v 1.29 2003/07/04 08:51:37 davidxu Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_sigwait.c,v 1.30 2003/07/09 14:30:51 davidxu Exp $
  */
 #include <signal.h>
 #include <sys/param.h>
@@ -123,6 +123,7 @@
 			}
 		}
 		curthread->timeout = 0;
+		curthread->interrupted = 0;
 		_thr_set_timeout(timeout);
 		/* Wait for a signal: */
 		curthread->oldsigmask = curthread->sigmask;
@@ -134,18 +135,18 @@
 		_thr_sched_switch_unlocked(curthread);
 		/*
 		 * Return the signal number to the caller:
-		 * XXX Here is race, how about a signal come in before
-		 * we reach here? so we might got an incorrect timeout
-		 * status.
 		 */
 		if (siginfo.si_signo > 0) {
 			ret = siginfo.si_signo;
 		} else {
-			if (curthread->timeout)
+			if (curthread->interrupted)
+				errno = EINTR;
+			else if (curthread->timeout)
 				errno = EAGAIN;
 			ret = -1;
 		}
-
+		curthread->timeout = 0;
+		curthread->interrupted = 0;
 		/*
 		 * Probably unnecessary, but since it's in a union struct
 		 * we don't know how it could be used in the future.

==== //depot/projects/ia64/libexec/ftpd/ftpcmd.y#17 (text+ko) ====

@@ -45,7 +45,7 @@
 static char sccsid[] = "@(#)ftpcmd.y	8.3 (Berkeley) 4/6/94";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/libexec/ftpd/ftpcmd.y,v 1.52 2003/06/21 10:45:38 yar Exp $";
+  "$FreeBSD: src/libexec/ftpd/ftpcmd.y,v 1.54 2003/07/09 13:54:33 yar Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -1169,6 +1169,7 @@
 {
 	int c;
 	register char *cs;
+	sigset_t sset, osset;
 
 	cs = s;
 /* tmpline may contain saved command from urgent mode interruption */
@@ -1184,21 +1185,28 @@
 		if (c == 0)
 			tmpline[0] = '\0';
 	}
+	/* SIGURG would interrupt stdio if not blocked during the read loop */
+	sigemptyset(&sset);
+	sigaddset(&sset, SIGURG);
+	sigprocmask(SIG_BLOCK, &sset, &osset);
 	while ((c = getc(iop)) != EOF) {
 		c &= 0377;
 		if (c == IAC) {
-		    if ((c = getc(iop)) != EOF) {
+			if ((c = getc(iop)) == EOF)
+				goto got_eof;
 			c &= 0377;
 			switch (c) {
 			case WILL:
 			case WONT:
-				c = getc(iop);
+				if ((c = getc(iop)) == EOF)
+					goto got_eof;
 				printf("%c%c%c", IAC, DONT, 0377&c);
 				(void) fflush(stdout);
 				continue;
 			case DO:
 			case DONT:
-				c = getc(iop);
+				if ((c = getc(iop)) == EOF)
+					goto got_eof;
 				printf("%c%c%c", IAC, WONT, 0377&c);
 				(void) fflush(stdout);
 				continue;
@@ -1207,12 +1215,13 @@
 			default:
 				continue;	/* ignore command */
 			}
-		    }
 		}
 		*cs++ = c;
 		if (--n <= 0 || c == '\n')
 			break;
 	}
+got_eof:
+	sigprocmask(SIG_SETMASK, &osset, NULL);
 	if (c == EOF && cs == s)
 		return (NULL);
 	*cs++ = '\0';

==== //depot/projects/ia64/libexec/ftpd/ftpd.c#21 (text+ko) ====

@@ -44,7 +44,7 @@
 static char sccsid[] = "@(#)ftpd.c	8.4 (Berkeley) 4/16/94";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.144 2003/02/11 14:10:48 yar Exp $";
+  "$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.145 2003/07/09 12:46:24 yar Exp $";
 #endif /* not lint */
 
 /*
@@ -1494,9 +1494,11 @@
 	 * c) expand it to the absolute pathname if necessary.
 	 */
 	if (dochroot && residue &&
-	    (chrootdir = strtok(residue, " \t")) != NULL &&
-	    chrootdir[0] != '/') {
-		asprintf(&chrootdir, "%s/%s", pw->pw_dir, chrootdir);
+	    (chrootdir = strtok(residue, " \t")) != NULL) {
+		if (chrootdir[0] != '/')
+			asprintf(&chrootdir, "%s/%s", pw->pw_dir, chrootdir);
+		else
+			chrootdir = strdup(chrootdir); /* so it can be freed */
 		if (chrootdir == NULL)
 			fatalerror("Ran out of memory.");
 	}

==== //depot/projects/ia64/release/doc/ja_JP.eucJP/relnotes/common/new.sgml#26 (text+ko) ====

@@ -1,9 +1,9 @@
 <!--
     FreeBSD Japanese Documentation Project
 
-    $FreeBSD: src/release/doc/ja_JP.eucJP/relnotes/common/new.sgml,v 1.89 2003/07/04 15:39:29 hrs Exp $
+    $FreeBSD: src/release/doc/ja_JP.eucJP/relnotes/common/new.sgml,v 1.90 2003/07/09 08:58:08 hrs Exp $
 
-    Original revision: 1.582
+    Original revision: 1.583
 -->
 
 <articleinfo>
@@ -11,7 +11,7 @@
 
   <corpauthor>FreeBSD ¥×¥í¥¸¥§¥¯¥È</corpauthor>
 
-  <pubdate>$FreeBSD: src/release/doc/ja_JP.eucJP/relnotes/common/new.sgml,v 1.89 2003/07/04 15:39:29 hrs Exp $</pubdate>
+  <pubdate>$FreeBSD: src/release/doc/ja_JP.eucJP/relnotes/common/new.sgml,v 1.90 2003/07/09 08:58:08 hrs Exp $</pubdate>
 
   <copyright>
     <year>2000</year>
@@ -227,7 +227,8 @@
     <para>&man.chroot.8; ¤¬¡¢chroot ´Ä¶­¤Ç»È¤¦¥æ¡¼¥¶¤È¥×¥é¥¤¥Þ¥ê¥°¥ë¡¼¥×¡¢
       ¥°¥ë¡¼¥×¥ê¥¹¥È¤ÎÀßÄê¤ËÂбþ¤·¤Þ¤·¤¿¡£
       ÀßÄê¤Ë¤Ï¤½¤ì¤¾¤ì¡¢<option>-u</option>, <option>-g</option>,
-      <option>-G</option> ¥ª¥×¥·¥ç¥ó¤ò»È¤¤¤Þ¤¹¡£</para>
+      <option>-G</option> ¥ª¥×¥·¥ç¥ó¤ò»È¤¤¤Þ¤¹¡£
+      &merged;</para>
 
     <para>devfs ¤¬É¬¿Ü¤È¤Ê¤Ã¤¿¤¿¤á¡¢dev_db ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ïºï½ü¤µ¤ì¤Þ¤·¤¿¡£</para>
 

==== //depot/projects/ia64/share/man/man4/amr.4#3 (text+ko) ====

@@ -21,7 +21,7 @@
 .\" (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: src/share/man/man4/amr.4,v 1.16 2003/03/26 01:34:23 keramida Exp $
+.\" $FreeBSD: src/share/man/man4/amr.4,v 1.17 2003/07/10 00:25:51 obrien Exp $
 .\"
 .Dd January 23, 2000
 .Dt AMR 4
@@ -61,6 +61,8 @@
 .It
 MegaRAID Elite 1600 (Series 493)
 .It
+MegaRAID Elite 1650 (Series 4xx)
+.It
 MegaRAID Express 100 (Series 466WS)
 .It
 MegaRAID Express 200 (Series 466)
@@ -75,9 +77,11 @@
 .It
 Dell PERC 2/DC
 .It
+Dell PERC 3/QC
+.It
 HP NetRAID-1/Si
 .It
-HP NetRAID-3/Si
+HP NetRAID-3/Si (D4943A)
 .It
 HP Embedded NetRAID
 .El

==== //depot/projects/ia64/sys/amd64/amd64/pmap.c#11 (text+ko) ====

@@ -39,7 +39,7 @@
  * SUCH DAMAGE.
  *
  *	from:	@(#)pmap.c	7.7 (Berkeley)	5/12/91
- * $FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.420 2003/07/08 19:40:34 alc Exp $
+ * $FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.423 2003/07/09 22:59:45 peter Exp $
  */
 /*-
  * Copyright (c) 2003 Networks Associates Technology, Inc.
@@ -330,6 +330,8 @@
 	pde = pmap_pde(pmap, va);
 	if (pde == NULL || (*pde & PG_V) == 0)
 		return NULL;
+	if ((*pde & PG_PS) != 0)	/* compat with i386 pmap_pte() */
+		return ((pt_entry_t *)pde);
 	pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME);
 	return (&pte[pmap_pte_index(va)]);
 }
@@ -386,14 +388,12 @@
 		((pd_entry_t *)KPDphys)[i] |= PG_RW | PG_V;
 	}
 
-#if 0
 	/* Map from zero to end of allocations under 2M pages */
 	/* This replaces some of the KPTphys entries above */
 	for (i = 0; (i << PDRSHIFT) < avail_start; i++) {
 		((pd_entry_t *)KPDphys)[i] = i << PDRSHIFT;
 		((pd_entry_t *)KPDphys)[i] |= PG_RW | PG_V | PG_PS;
 	}
-#endif
 
 	/* And connect up the PD to the PDP */
 	for (i = 0; i < NKPDPE; i++) {
@@ -890,6 +890,7 @@
 
 	if (m->hold_count == 0) {
 		vm_offset_t pteva;
+
 		/*
 		 * unmap the page table page
 		 */
@@ -914,9 +915,11 @@
 		}
 		--pmap->pm_stats.resident_count;
 		if (m->pindex < NUPDE) {
-			/* Unhold the PD page */
+			/* We just released a PT, unhold the matching PD */
 			vm_page_t pdpg;
-			pdpg = vm_page_lookup(pmap->pm_pteobj, NUPDE + pmap_pdpe_index(va));
+
+			pdpg = vm_page_lookup(pmap->pm_pteobj, NUPDE +
+			    ((va >> PDPSHIFT) & (NUPDPE - 1)));
 			while (vm_page_sleep_if_busy(pdpg, FALSE, "pulook"))
 				vm_page_lock_queues();
 			vm_page_unhold(pdpg);
@@ -924,9 +927,11 @@
 				_pmap_unwire_pte_hold(pmap, va, pdpg);
 		}
 		if (m->pindex >= NUPDE && m->pindex < (NUPDE + NUPDPE)) {
-			/* Unhold the PDP page */
+			/* We just released a PD, unhold the matching PDP */
 			vm_page_t pdppg;
-			pdppg = vm_page_lookup(pmap->pm_pteobj, NUPDE + NUPDPE + pmap_pml4e_index(va));
+
+			pdppg = vm_page_lookup(pmap->pm_pteobj, NUPDE + NUPDPE +
+			    ((va >> PML4SHIFT) & (NUPML4E - 1)));
 			while (vm_page_sleep_if_busy(pdppg, FALSE, "pulooK"))
 				vm_page_lock_queues();
 			vm_page_unhold(pdppg);
@@ -1124,7 +1129,8 @@
 			_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index);
 		} else {
 			/* Add reference to pdp page */
-			pdppg = pmap_page_lookup(pmap->pm_pteobj, NUPDE + NUPDPE + pml4index);
+			pdppg = pmap_page_lookup(pmap->pm_pteobj,
+			    NUPDE + NUPDPE + pml4index);
 			pdppg->hold_count++;
 		}
 		pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME);
@@ -1150,16 +1156,17 @@
 			/* Have to allocate a new pd, recurse */
 			_pmap_allocpte(pmap, NUPDE + pdpindex);
 			pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME);
-			pdp = &pdp[pdpindex];
+			pdp = &pdp[pdpindex & ((1ul << NPDPEPGSHIFT) - 1)];
 		} else {
 			pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME);
-			pdp = &pdp[pdpindex];
+			pdp = &pdp[pdpindex & ((1ul << NPDPEPGSHIFT) - 1)];
 			if ((*pdp & PG_V) == 0) {
 				/* Have to allocate a new pd, recurse */
 				_pmap_allocpte(pmap, NUPDE + pdpindex);
 			} else {
 				/* Add reference to the pd page */
-				pdpg = pmap_page_lookup(pmap->pm_pteobj, NUPDE + pdpindex);
+				pdpg = pmap_page_lookup(pmap->pm_pteobj,
+				    NUPDE + pdpindex);
 				pdpg->hold_count++;
 			}
 		}
@@ -1239,7 +1246,7 @@
 
 
 /***************************************************
-* Pmap allocation/deallocation routines.
+ * Pmap allocation/deallocation routines.
  ***************************************************/
 
 /*

==== //depot/projects/ia64/sys/amd64/include/pmap.h#5 (text+ko) ====

@@ -42,7 +42,7 @@
  *
  *	from: hp300: @(#)pmap.h	7.2 (Berkeley) 12/16/90
  *	from: @(#)pmap.h	7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.104 2003/06/22 13:02:45 simokawa Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.105 2003/07/09 23:04:23 peter Exp $
  */
 
 #ifndef _MACHINE_PMAP_H_
@@ -86,14 +86,18 @@
  * Pte related macros.  This is complicated by having to deal with
  * the sign extension of the 48th bit.
  */
-#define VADDR_SIGN(l4) \
-	((l4) >= NPML4EPG/2 ? ((unsigned long)-1 << 47) : 0ul)
-#define VADDR(l4, l3, l2, l1) ( \
-	((unsigned long)(l4) << PML4SHIFT) | VADDR_SIGN(l4) | \
+#define KVADDR(l4, l3, l2, l1) ( \
+	((unsigned long)-1 << 47) | \
+	((unsigned long)(l4) << PML4SHIFT) | \
 	((unsigned long)(l3) << PDPSHIFT) | \
 	((unsigned long)(l2) << PDRSHIFT) | \
 	((unsigned long)(l1) << PAGE_SHIFT))
 
+#define UVADDR(l4, l3, l2, l1) ( \
+	((unsigned long)(l4) << PML4SHIFT) | \
+	((unsigned long)(l3) << PDPSHIFT) | \
+	((unsigned long)(l2) << PDRSHIFT) | \
+	((unsigned long)(l1) << PAGE_SHIFT))
 
 #ifndef NKPT
 #define	NKPT		120	/* initial number of kernel page tables */
@@ -103,7 +107,7 @@
 #define NKPDPE		1		/* number of kernel PDP slots */
 #define	NKPDE		(NKPDPE*NPDEPG)	/* number of kernel PD slots */
 
-#define	NUPML4E		1		/* number of userland PML4 pages */
+#define	NUPML4E		(NPML4EPG/2)	/* number of userland PML4 pages */
 #define	NUPDPE		(NUPML4E*NPDPEPG)/* number of userland PDP pages */
 #define	NUPDE		(NUPDPE*NPDEPG)	/* number of userland PD entries */
 
@@ -149,10 +153,10 @@
  * in the page tables and the evil overlapping.
  */
 #ifdef _KERNEL
-#define	addr_PTmap	(VADDR(PML4PML4I, 0, 0, 0))
-#define	addr_PDmap	(VADDR(PML4PML4I, PML4PML4I, 0, 0))
-#define	addr_PDPmap	(VADDR(PML4PML4I, PML4PML4I, PML4PML4I, 0))
-#define	addr_PML4map	(VADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I))
+#define	addr_PTmap	(KVADDR(PML4PML4I, 0, 0, 0))
+#define	addr_PDmap	(KVADDR(PML4PML4I, PML4PML4I, 0, 0))
+#define	addr_PDPmap	(KVADDR(PML4PML4I, PML4PML4I, PML4PML4I, 0))
+#define	addr_PML4map	(KVADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I))
 #define	addr_PML4pml4e	(addr_PML4map + (PML4PML4I * sizeof(pml4_entry_t)))
 #define	PTmap		((pt_entry_t *)(addr_PTmap))
 #define	PDmap		((pd_entry_t *)(addr_PDmap))

==== //depot/projects/ia64/sys/amd64/include/vmparam.h#3 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)vmparam.h	5.9 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.38 2003/05/23 06:36:46 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.39 2003/07/09 23:04:23 peter Exp $
  */
 
 
@@ -92,18 +92,18 @@
  * messy at times, but hey, we'll do anything to save a page :-)
  */
 
-#define	VM_MAX_KERNEL_ADDRESS	VADDR(KPML4I, NPDPEPG-1, NKPDE-1, NPTEPG-1)
-#define	VM_MIN_KERNEL_ADDRESS	VADDR(KPML4I, KPDPI, 0, 0)
+#define	VM_MAX_KERNEL_ADDRESS	KVADDR(KPML4I, NPDPEPG-1, NKPDE-1, NPTEPG-1)
+#define	VM_MIN_KERNEL_ADDRESS	KVADDR(KPML4I, KPDPI, 0, 0)
 
-#define	DMAP_MIN_ADDRESS	VADDR(DMPML4I, 0, 0, 0)
-#define	DMAP_MAX_ADDRESS	VADDR(DMPML4I+1, 0, 0, 0)
+#define	DMAP_MIN_ADDRESS	KVADDR(DMPML4I, 0, 0, 0)
+#define	DMAP_MAX_ADDRESS	KVADDR(DMPML4I+1, 0, 0, 0)
 
-#define	KERNBASE		VADDR(KPML4I, KPDPI, 0, 0)
+#define	KERNBASE		KVADDR(KPML4I, KPDPI, 0, 0)
 
-#define	UPT_MAX_ADDRESS		VADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I)
-#define	UPT_MIN_ADDRESS		VADDR(PML4PML4I, 0, 0, 0)
+#define	UPT_MAX_ADDRESS		KVADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I)
+#define	UPT_MIN_ADDRESS		KVADDR(PML4PML4I, 0, 0, 0)
 
-#define	VM_MAXUSER_ADDRESS	VADDR(NUPML4E, 0, 0, 0)
+#define	VM_MAXUSER_ADDRESS	UVADDR(NUPML4E, 0, 0, 0)
 
 #define	USRSTACK		VM_MAXUSER_ADDRESS
 

==== //depot/projects/ia64/sys/conf/files#86 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.802 2003/07/08 18:59:32 jhb Exp $
+# $FreeBSD: src/sys/conf/files,v 1.803 2003/07/09 16:14:10 jhb Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -241,7 +241,7 @@
 dev/acpica/acpi_cmbat.c		optional acpi
 dev/acpica/acpi_cpu.c		optional acpi
 dev/acpica/acpi_ec.c		optional acpi
-dev/acpica/acpi_isab.c		optional acpi
+dev/acpica/acpi_isab.c		optional acpi isa
 dev/acpica/acpi_lid.c		optional acpi
 dev/acpica/acpi_pci.c		optional acpi pci
 dev/acpica/acpi_pci_link.c	optional acpi pci
@@ -544,10 +544,10 @@
 dev/pccard/pccard_cis_quirks.c optional pccard
 dev/pccard/power_if.m	standard
 dev/pccbb/pccbb.c	optional cbb
-dev/pci/eisa_pci.c	optional pci
+dev/pci/eisa_pci.c	optional pci eisa
 dev/pci/fixup_pci.c	optional pci
 dev/pci/ignore_pci.c	optional pci
-dev/pci/isa_pci.c	optional pci
+dev/pci/isa_pci.c	optional pci isa
 dev/pci/pci.c		optional pci
 dev/pci/pci_if.m	standard
 dev/pci/pci_pci.c	optional pci

==== //depot/projects/ia64/sys/conf/options.i386#19 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.i386,v 1.193 2003/06/27 22:39:13 peter Exp $
+# $FreeBSD: src/sys/conf/options.i386,v 1.194 2003/07/10 01:02:58 peter Exp $
 # Options specific to the i386 platform kernels
 
 MATH_EMULATE		opt_math_emulate.h
@@ -6,7 +6,6 @@
 DISABLE_PSE		opt_pmap.h
 PMAP_SHPGPERPROC	opt_pmap.h
 DISABLE_PG_G		opt_pmap.h
-LAZY_SWITCH		opt_swtch.h
 PPC_PROBE_CHIPSET	opt_ppc.h
 PPC_DEBUG		opt_ppc.h
 MAXMEM

==== //depot/projects/ia64/sys/conf/options.pc98#20 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.pc98,v 1.165 2003/06/27 22:39:13 peter Exp $
+# $FreeBSD: src/sys/conf/options.pc98,v 1.166 2003/07/10 01:02:58 peter Exp $
 # Options specific to the pc98 platform kernels
 
 MATH_EMULATE		opt_math_emulate.h
@@ -6,7 +6,6 @@
 DISABLE_PSE		opt_pmap.h
 PMAP_SHPGPERPROC	opt_pmap.h
 DISABLE_PG_G		opt_pmap.h
-LAZY_SWITCH		opt_swtch.h
 PPC_PROBE_CHIPSET	opt_ppc.h
 PPC_DEBUG		opt_ppc.h
 MAXMEM

==== //depot/projects/ia64/sys/dev/aac/aac.c#27 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/aac/aac.c,v 1.70 2003/07/01 15:51:51 scottl Exp $
+ *	$FreeBSD: src/sys/dev/aac/aac.c,v 1.73 2003/07/09 21:16:23 scottl Exp $
  */
 
 /*
@@ -67,7 +67,7 @@
 
 /* Command Processing */
 static void	aac_timeout(struct aac_softc *sc);
-static int	aac_start(struct aac_command *cm);
+static int	aac_map_command(struct aac_command *cm);
 static void	aac_complete(void *context, int pending);
 static int	aac_bio_command(struct aac_softc *sc, struct aac_command **cmp);
 static void	aac_bio_complete(struct aac_command *cm);
@@ -75,11 +75,12 @@
 static void	aac_command_thread(struct aac_softc *sc);
 
 /* Command Buffer Management */
+static void	aac_map_command_sg(void *arg, bus_dma_segment_t *segs,
+				   int nseg, int error);
 static void	aac_map_command_helper(void *arg, bus_dma_segment_t *segs,
 				       int nseg, int error);
 static int	aac_alloc_commands(struct aac_softc *sc);
 static void	aac_free_commands(struct aac_softc *sc);
-static void	aac_map_command(struct aac_command *cm);
 static void	aac_unmap_command(struct aac_command *cm);
 
 /* Hardware Interface */
@@ -667,6 +668,9 @@
 
 	debug_called(2);
 
+	if (sc->flags & AAC_QUEUE_FRZN)
+		return;
+
 	for (;;) {
 		/*
 		 * Try to get a command that's been put off for lack of 
@@ -686,7 +690,7 @@
 			break;
 
 		/* try to give the command to the controller */
-		if (aac_start(cm) == EBUSY) {
+		if (aac_map_command(cm) == EBUSY) {
 			/* put it on the ready queue for later */
 			aac_requeue_ready(cm);
 			break;
@@ -699,7 +703,7 @@
  * last moment when possible.
  */
 static int
-aac_start(struct aac_command *cm)
+aac_map_command(struct aac_command *cm)
 {
 	struct aac_softc *sc;
 	int error;
@@ -707,22 +711,23 @@
 	debug_called(2);
 
 	sc = cm->cm_sc;
+	error = 0;
 
-	/* get the command mapped */
-	aac_map_command(cm);
+	/* don't map more than once */
+	if (cm->cm_flags & AAC_CMD_MAPPED)
+		return (0);
 
-	/* Fix up the address values in the FIB.  Use the command array index
-	 * instead of a pointer since these fields are only 32 bits.  Shift
-	 * the SenderFibAddress over to make room for the fast response bit.
-	 */
-	cm->cm_fib->Header.SenderFibAddress = (cm->cm_index << 1);
-	cm->cm_fib->Header.ReceiverFibAddress = cm->cm_fibphys;
-
-	/* save a pointer to the command for speedy reverse-lookup */
-	cm->cm_fib->Header.SenderData = cm->cm_index;
-	/* put the FIB on the outbound queue */
-	error = aac_enqueue_fib(sc, cm->cm_queue, cm);
-	return(error);
+	if (cm->cm_datalen != 0) {
+		error = bus_dmamap_load(sc->aac_buffer_dmat, cm->cm_datamap,
+					cm->cm_data, cm->cm_datalen,
+					aac_map_command_sg, cm, 0);
+		if (error == EINPROGRESS) {
+			debug(1, "freezing queue\n");
+			sc->flags |= AAC_QUEUE_FRZN;
+			error = 0;
+		}
+	}
+	return (error);
 }
 
 /*
@@ -859,6 +864,7 @@
 	}
 
 	/* see if we can start some more I/O */
+	sc->flags &= ~AAC_QUEUE_FRZN;
 	aac_startio(sc);
 
 	AAC_LOCK_RELEASE(&sc->aac_io_lock);
@@ -1158,9 +1164,10 @@
 		return (ENOMEM);
 	}
 
-	bus_dmamap_load(sc->aac_fib_dmat, fm->aac_fibmap, fm->aac_fibs, 
-			AAC_FIB_COUNT * sizeof(struct aac_fib),
-			aac_map_command_helper, &fibphys, 0);
+	/* Ignore errors since this doesn't bounce */
+	(void)bus_dmamap_load(sc->aac_fib_dmat, fm->aac_fibmap, fm->aac_fibs, 
+			      AAC_FIB_COUNT * sizeof(struct aac_fib),
+			      aac_map_command_helper, &fibphys, 0);
 
 	/* initialise constant fields in the command structure */
 	bzero(fm->aac_fibs, AAC_FIB_COUNT * sizeof(struct aac_fib));
@@ -1227,6 +1234,7 @@
 static void
 aac_map_command_sg(void *arg, bus_dma_segment_t *segs, int nseg, int error)
 {
+	struct aac_softc *sc;
 	struct aac_command *cm;
 	struct aac_fib *fib;
 	int i;
@@ -1234,6 +1242,7 @@
 	debug_called(3);
 
 	cm = (struct aac_command *)arg;
+	sc = cm->cm_sc;
 	fib = cm->cm_fib;
 
 	/* copy into the FIB */
@@ -1260,37 +1269,30 @@
 			fib->Header.Size += nseg*sizeof(struct aac_sg_entry64);
 		}
 	}
-}
 
-/*
- * Map a command into controller-visible space.
- */
-static void
-aac_map_command(struct aac_command *cm)
-{
-	struct aac_softc *sc;
+	/* Fix up the address values in the FIB.  Use the command array index
+	 * instead of a pointer since these fields are only 32 bits.  Shift
+	 * the SenderFibAddress over to make room for the fast response bit.
+	 */
+	cm->cm_fib->Header.SenderFibAddress = (cm->cm_index << 1);
+	cm->cm_fib->Header.ReceiverFibAddress = cm->cm_fibphys;
 
-	debug_called(2);
+	/* save a pointer to the command for speedy reverse-lookup */
+	cm->cm_fib->Header.SenderData = cm->cm_index;
 
-	sc = cm->cm_sc;
+	if (cm->cm_flags & AAC_CMD_DATAIN)
+		bus_dmamap_sync(sc->aac_buffer_dmat, cm->cm_datamap,
+				BUS_DMASYNC_PREREAD);
+	if (cm->cm_flags & AAC_CMD_DATAOUT)
+		bus_dmamap_sync(sc->aac_buffer_dmat, cm->cm_datamap,
+				BUS_DMASYNC_PREWRITE);
+	cm->cm_flags |= AAC_CMD_MAPPED;
 
-	/* don't map more than once */
-	if (cm->cm_flags & AAC_CMD_MAPPED)
-		return;
+	/* put the FIB on the outbound queue */
+	if (aac_enqueue_fib(sc, cm->cm_queue, cm) == EBUSY)
+		aac_requeue_ready(cm);
 
-	if (cm->cm_datalen != 0) {
-		bus_dmamap_load(sc->aac_buffer_dmat, cm->cm_datamap,
-				cm->cm_data, cm->cm_datalen,
-				aac_map_command_sg, cm, 0);
-
-		if (cm->cm_flags & AAC_CMD_DATAIN)
-			bus_dmamap_sync(sc->aac_buffer_dmat, cm->cm_datamap,
-					BUS_DMASYNC_PREREAD);
-		if (cm->cm_flags & AAC_CMD_DATAOUT)
-			bus_dmamap_sync(sc->aac_buffer_dmat, cm->cm_datamap,
-					BUS_DMASYNC_PREWRITE);
-	}
-	cm->cm_flags |= AAC_CMD_MAPPED;
+	return;
 }
 
 /*
@@ -1386,7 +1388,8 @@
 		sc->flags |= AAC_FLAGS_4GB_WINDOW;
 	if (options & AAC_SUPPORTED_NONDASD)
 		sc->flags |= AAC_FLAGS_ENABLE_CAM;
-	if ((options & AAC_SUPPORTED_SGMAP_HOST64) != 0 && (sizeof(bus_addr_t) > 4)) {
+	if ((options & AAC_SUPPORTED_SGMAP_HOST64) != 0
+	     && (sizeof(bus_addr_t) > 4)) {
 		device_printf(sc->aac_dev, "Enabling 64-bit address support\n");
 		sc->flags |= AAC_FLAGS_SG_64BIT;
 	}
@@ -1510,7 +1513,7 @@
 	 * XXX If the padding is not needed, can it be put to use instead
 	 * of ignored?
 	 */
-	bus_dmamap_load(sc->aac_common_dmat, sc->aac_common_dmamap,
+	(void)bus_dmamap_load(sc->aac_common_dmat, sc->aac_common_dmamap,
 			sc->aac_common, 8192 + sizeof(*sc->aac_common),
 			aac_common_map, sc, 0);
 
@@ -1549,8 +1552,17 @@
 				  offsetof(struct aac_common, ac_printf);
 	ip->PrintfBufferSize = AAC_PRINTF_BUFSIZE;
 
-	/* The adapter assumes that pages are 4K in size */
+	/* 
+	 * The adapter assumes that pages are 4K in size, except on some
+ 	 * broken firmware versions that do the page->byte conversion twice,
+	 * therefore 'assuming' that this value is in 16MB units (2^24).
+	 * Round up since the granularity is so high.
+	 */
 	ip->HostPhysMemPages = ctob(physmem) / AAC_PAGE_SIZE;
+	if (sc->flags & AAC_FLAGS_BROKEN_MEMMAP) {
+		ip->HostPhysMemPages =
+		    (ip->HostPhysMemPages + AAC_PAGE_SIZE) / AAC_PAGE_SIZE;
+	}
 	ip->HostElapsedSeconds = time_second;	/* reset later if invalid */
 
 	/*

==== //depot/projects/ia64/sys/dev/aac/aac_pci.c#20 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/aac/aac_pci.c,v 1.35 2003/07/01 15:51:51 scottl Exp $
+ *	$FreeBSD: src/sys/dev/aac/aac_pci.c,v 1.36 2003/07/09 19:19:16 scottl Exp $
  */
 
 /*
@@ -114,8 +114,8 @@
 	"Dell PERC 3/Di"},
 	{0x1011, 0x0046, 0x9005, 0x0364, AAC_HWIF_STRONGARM, 0,
 	"Adaptec AAC-364"},
-	{0x1011, 0x0046, 0x9005, 0x0365, AAC_HWIF_STRONGARM, 0,
-	 "Adaptec SCSI RAID 5400S"},
+	{0x1011, 0x0046, 0x9005, 0x0365, AAC_HWIF_STRONGARM,
+	 AAC_FLAGS_BROKEN_MEMMAP, "Adaptec SCSI RAID 5400S"},
 	{0x1011, 0x0046, 0x9005, 0x1364, AAC_HWIF_STRONGARM, AAC_FLAGS_PERC2QC,
 	 "Dell PERC 2/QC"},
 	{0x1011, 0x0046, 0x103c, 0x10c2, AAC_HWIF_STRONGARM, 0,

==== //depot/projects/ia64/sys/dev/aac/aacvar.h#17 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/aac/aacvar.h,v 1.33 2003/04/01 15:06:22 phk Exp $
+ *	$FreeBSD: src/sys/dev/aac/aacvar.h,v 1.35 2003/07/09 21:16:23 scottl Exp $
  */
 
 #include <sys/bio.h>
@@ -167,6 +167,8 @@
 #define AAC_ON_AACQ_BUSY	(1<<7)
 #define AAC_ON_AACQ_COMPLETE	(1<<8)
 #define AAC_ON_AACQ_MASK	((1<<5)|(1<<6)|(1<<7)|(1<<8))
+#define AAC_QUEUE_FRZN		(1<<9)		/* Freeze the processing of
+						 * commands on the queue. */
 
 	void			(* cm_complete)(struct aac_command *cm);
 	void			*cm_private;
@@ -369,6 +371,7 @@
 						 * 2GB-4GB range */
 #define	AAC_FLAGS_NO4GB		(1 << 6)	/* Can't access host mem >2GB */
 #define	AAC_FLAGS_256FIBS	(1 << 7)	/* Can only do 256 commands */
+#define	AAC_FLAGS_BROKEN_MEMMAP (1 << 8)	/* Broken HostPhysMemPages */
 
 	u_int32_t		supported_options;
 	int			aac_max_fibs;

==== //depot/projects/ia64/sys/dev/acpica/acpi_isab.c#2 (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/dev/acpica/acpi_isab.c,v 1.1 2003/07/08 18:59:32 jhb Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi_isab.c,v 1.2 2003/07/09 18:28:53 jhb Exp $
  */
 
 /*
@@ -93,7 +93,8 @@
 {
 
 	if ((acpi_get_type(dev) == ACPI_TYPE_DEVICE) &&
-	    !acpi_disabled("isa	") &&
+	    !acpi_disabled("isa") &&
+	    devclass_get_device(isab_devclass, 0) == NULL &&
 	    (acpi_MatchHid(dev, "PNP0A05") || acpi_MatchHid(dev, "PNP0A06"))) {
 		device_set_desc(dev, "ACPI Generic ISA bridge");
 		return(0);

==== //depot/projects/ia64/sys/dev/firewire/firewire.c#33 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.55 2003/06/30 06:33:18 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.56 2003/07/09 13:07:35 simokawa Exp $
  *
  */
 
@@ -596,7 +596,7 @@
 	src->businfo.cyc_clk_acc = 100;
 	src->businfo.max_rec = fc->maxrec;
 	src->businfo.max_rom = MAXROM_4;
-	src->businfo.generation = 0;
+	src->businfo.generation = 1;
 	src->businfo.link_spd = fc->speed;
 
 	src->businfo.eui64.hi = fc->eui.hi;
@@ -622,7 +622,6 @@
 	src = fc->crom_src;
 	root = fc->crom_root;
 
-	src->businfo.generation ++;
 	STAILQ_INIT(&src->chunk_list);
 
 	bzero(root, sizeof(struct crom_chunk));
@@ -642,7 +641,9 @@
 fw_busreset(struct firewire_comm *fc)
 {
 	struct firewire_dev_comm *fdc;
+	struct crom_src *src;
 	device_t *devlistp;
+	void *newrom;
 	int i, devcnt;
 
 	switch(fc->status){
@@ -666,7 +667,19 @@
 		free(devlistp, M_TEMP);
 	}
 
-	crom_load(&fc->crom_src_buf->src, fc->config_rom, CROMSIZE);
+	newrom = malloc(CROMSIZE, M_FW, M_NOWAIT | M_ZERO);
+	src = &fc->crom_src_buf->src;
+	crom_load(src, (u_int32_t *)newrom, CROMSIZE);
+	if (bcmp(newrom, fc->config_rom, CROMSIZE) != 0) {
+		/* bump generation and reload */
+		src->businfo.generation ++;
+		/* generation must be between 0x2 and 0xF */

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


More information about the p4-projects mailing list