Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jul 2002 18:41:15 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14565 for review
Message-ID:  <200207210141.g6L1fF2r051310@freefall.freebsd.org>

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

Change 14565 by peter@peter_daintree on 2002/07/20 18:40:43

	IFC @14563

Affected files ...

.. //depot/projects/ia64/sys/kern/sys_process.c#12 integrate
.. //depot/projects/ia64/sys/netinet/ip_var.h#5 integrate
.. //depot/projects/ia64/sys/netinet/tcp_timer.c#7 integrate
.. //depot/projects/ia64/sys/pccard/i82365.h#5 integrate
.. //depot/projects/ia64/sys/pccard/pcic.c#10 integrate
.. //depot/projects/ia64/sys/pccard/pcic_pci.c#10 integrate
.. //depot/projects/ia64/sys/pccard/pcicvar.h#3 integrate
.. //depot/projects/ia64/sys/vm/swap_pager.c#9 integrate
.. //depot/projects/ia64/sys/vm/vm_page.c#15 integrate
.. //depot/projects/ia64/sys/vm/vm_pageout.c#12 integrate

Differences ...

==== //depot/projects/ia64/sys/kern/sys_process.c#12 (text+ko) ====

@@ -28,7 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/sys_process.c,v 1.97 2002/07/12 17:21:22 alc Exp $
+ * $FreeBSD: src/sys/kern/sys_process.c,v 1.98 2002/07/20 22:44:39 rwatson Exp $
  */
 
 #include <sys/param.h>
@@ -392,10 +392,8 @@
 			return (ESRCH);
 		}
 	}
-	if (p_cansee(td, p)) {
-		error = ESRCH;
+	if ((error = p_cansee(td, p)) != 0)
 		goto fail;
-	}
 
 	if ((error = p_candebug(td, p)) != 0)
 		goto fail;

==== //depot/projects/ia64/sys/netinet/ip_var.h#5 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)ip_var.h	8.2 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/netinet/ip_var.h,v 1.62 2002/06/23 09:03:42 luigi Exp $
+ * $FreeBSD: src/sys/netinet/ip_var.h,v 1.63 2002/07/20 22:46:20 rwatson Exp $
  */
 
 #ifndef _NETINET_IP_VAR_H_
@@ -50,6 +50,7 @@
 	struct	in_addr ih_dst;		/* destination internet address */
 };
 
+#ifdef _KERNEL
 /*
  * Ip reassembly queue structure.  Each fragment
  * being reassembled is attached to one of these structures.
@@ -68,6 +69,7 @@
 	u_int16_t ipq_div_cookie;	/* ipfw divert cookie */
 #endif
 };
+#endif /* _KERNEL */
 
 /*
  * Structure stored in mbuf in inpcb.ip_options

==== //depot/projects/ia64/sys/netinet/tcp_timer.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)tcp_timer.c	8.2 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_timer.c,v 1.52 2002/07/18 19:06:12 dillon Exp $
+ * $FreeBSD: src/sys/netinet/tcp_timer.c,v 1.53 2002/07/20 23:48:59 jdp Exp $
  */
 
 #include "opt_compat.h"
@@ -74,13 +74,13 @@
 	int error, s, tt;
 
 	tt = *(int *)oidp->oid_arg1;
-	s = tt * 1000 / hz;
+	s = (int)((int64_t)tt * 1000 / hz);
 
 	error = sysctl_handle_int(oidp, &s, 0, req);
 	if (error || !req->newptr)
 		return (error);
 
-	tt = s * hz / 1000;
+	tt = (int)((int64_t)s * hz / 1000);
 	if (tt < 1)
 		return (EINVAL);
 

==== //depot/projects/ia64/sys/pccard/i82365.h#5 (text+ko) ====

@@ -33,7 +33,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/sys/pccard/i82365.h,v 1.25 2002/07/17 05:43:39 imp Exp $
+ * $FreeBSD: src/sys/pccard/i82365.h,v 1.26 2002/07/20 22:29:23 imp Exp $
  */
 
 #define	PCIC_I82365	0		/* Intel i82365SL-A/B or clone */
@@ -104,6 +104,13 @@
 #define	PCIC_TIME_CMD1		0x3e
 #define	PCIC_TIME_RECOV1	0x3f
 
+/* Yenta only registers */
+#define PCIC_MEMORY_HIGH0	0x40	/* A31..A25 of mapping addres for */
+#define PCIC_MEMORY_HIGH1	0x41	/* the memory windows. */
+#define PCIC_MEMORY_HIGH2	0x42
+#define PCIC_MEMORY_HIGH3	0x43
+
+
 #define	PCIC_SLOT_SIZE	0x40	/* Size of register set for one slot */
 
 /* Now register bits, ordered by reg # */

==== //depot/projects/ia64/sys/pccard/pcic.c#10 (text+ko) ====

@@ -27,7 +27,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/sys/pccard/pcic.c,v 1.176 2002/07/18 08:13:45 imp Exp $
+ * $FreeBSD: src/sys/pccard/pcic.c,v 1.177 2002/07/20 22:29:23 imp Exp $
  */
 
 #include <sys/param.h>
@@ -223,14 +223,25 @@
 	}
 	if (mp->flags & MDF_ACTIVE) {
 		unsigned long sys_addr = (uintptr_t)(void *)mp->start >> 12;
+		if ((sys_addr >> 12) != 0 && 
+		    (sp->sc->flags & PCIC_YENTA_HIGH_MEMORY) == 0) {
+			printf("This pcic does not support mapping > 24M\n");
+			return (ENXIO);
+		}
 		/*
 		 * Write the addresses, card offsets and length.
 		 * The values are all stored as the upper 12 bits of the
 		 * 24 bit address i.e everything is allocated as 4 Kb chunks.
+		 * Memory mapped cardbus bridges extend this slightly to allow
+		 * one to set the upper 8 bits of the 32bit address as well.
+		 * If the chip supports it, then go ahead and write those
+		 * upper 8 bits.
 		 */
 		pcic_putw(sp, reg, sys_addr & 0xFFF);
 		pcic_putw(sp, reg+2, (sys_addr + (mp->size >> 12) - 1) & 0xFFF);
 		pcic_putw(sp, reg+4, ((mp->card >> 12) - sys_addr) & 0x3FFF);
+		if (sp->sc->flags & PCIC_YENTA_HIGH_MEMORY)
+		    sp->putb(sp, PCIC_MEMORY_HIGH0 + win, sys_addr >> 12);
 		/*
 		 *	Each 16 bit register has some flags in the upper bits.
 		 */

==== //depot/projects/ia64/sys/pccard/pcic_pci.c#10 (text+ko) ====

@@ -26,7 +26,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/sys/pccard/pcic_pci.c,v 1.118 2002/07/18 08:05:00 imp Exp $
+ * $FreeBSD: src/sys/pccard/pcic_pci.c,v 1.119 2002/07/20 22:29:23 imp Exp $
  */
 
 #include <sys/param.h>
@@ -1269,6 +1269,8 @@
 			sp->revision = 0;
 			sc->flags = PCIC_CARDBUS_POWER;
 		}
+		/* All memory mapped cardbus bridges have these registers */
+		sc->flags |= PCIC_YENTA_HIGH_MEMORY;
 		sp->slt = (struct slot *) 1;
 		sc->csc_route = pcic_intr_path;
 		sc->func_route = pcic_intr_path;

==== //depot/projects/ia64/sys/pccard/pcicvar.h#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/sys/pccard/pcicvar.h,v 1.28 2001/11/09 05:24:51 imp Exp $
+ * $FreeBSD: src/sys/pccard/pcicvar.h,v 1.29 2002/07/20 22:29:23 imp Exp $
  */
 
 /*
@@ -52,6 +52,7 @@
 #define PCIC_KING_POWER    0x00000010	/* Uses IBM KING regs  */
 #define PCIC_RICOH_POWER   0x00000020	/* Uses the ricoh power regs */
 #define PCIC_CARDBUS_POWER 0x00000040	/* Cardbus power regs */
+#define PCIC_YENTA_HIGH_MEMORY 0x0080	/* Can do high memory mapping */
 
 	enum pcic_intr_way	csc_route; /* How to route csc interrupts */
 	enum pcic_intr_way	func_route; /* How to route function ints */

==== //depot/projects/ia64/sys/vm/swap_pager.c#9 (text+ko) ====

@@ -64,7 +64,7 @@
  *
  *	@(#)swap_pager.c	8.9 (Berkeley) 3/21/94
  *
- * $FreeBSD: src/sys/vm/swap_pager.c,v 1.175 2002/06/26 20:32:48 iedowse Exp $
+ * $FreeBSD: src/sys/vm/swap_pager.c,v 1.176 2002/07/20 20:58:46 alc Exp $
  */
 
 #include <sys/param.h>
@@ -1478,6 +1478,7 @@
 	 */
 	pmap_qremove((vm_offset_t)bp->b_data, bp->b_npages);
 
+	vm_page_lock_queues();
 	/*
 	 * cleanup pages.  If an error occurs writing to swap, we are in
 	 * very serious trouble.  If it happens to be a disk error, though,
@@ -1596,6 +1597,7 @@
 				vm_page_protect(m, VM_PROT_READ);
 		}
 	}
+	vm_page_unlock_queues();
 
 	/*
 	 * adjust pip.  NOTE: the original parent may still have its own

==== //depot/projects/ia64/sys/vm/vm_page.c#15 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)vm_page.c	7.4 (Berkeley) 5/7/91
- * $FreeBSD: src/sys/vm/vm_page.c,v 1.198 2002/07/20 19:34:21 alc Exp $
+ * $FreeBSD: src/sys/vm/vm_page.c,v 1.200 2002/07/20 20:58:46 alc Exp $
  */
 
 /*
@@ -1365,8 +1365,8 @@
 int
 vm_page_try_to_cache(vm_page_t m)
 {
-	GIANT_REQUIRED;
 
+	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
 	if (m->dirty || m->hold_count || m->busy || m->wire_count ||
 	    (m->flags & (PG_BUSY|PG_UNMANAGED))) {
 		return (0);
@@ -1387,6 +1387,8 @@
 int
 vm_page_try_to_free(vm_page_t m)
 {
+
+	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
 	if (m->dirty || m->hold_count || m->busy || m->wire_count ||
 	    (m->flags & (PG_BUSY|PG_UNMANAGED))) {
 		return (0);

==== //depot/projects/ia64/sys/vm/vm_pageout.c#12 (text+ko) ====

@@ -65,7 +65,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/vm/vm_pageout.c,v 1.199 2002/07/20 19:34:21 alc Exp $
+ * $FreeBSD: src/sys/vm/vm_pageout.c,v 1.200 2002/07/20 20:58:46 alc Exp $
  */
 
 /*
@@ -392,6 +392,7 @@
 	    (flags | ((object == kernel_object) ? OBJPC_SYNC : 0)),
 	    pageout_status);
 
+	vm_page_lock_queues();
 	for (i = 0; i < count; i++) {
 		vm_page_t mt = mc[i];
 
@@ -437,6 +438,7 @@
 				vm_page_protect(mt, VM_PROT_READ);
 		}
 	}
+	vm_page_unlock_queues();
 	return numpagedout;
 }
 

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?200207210141.g6L1fF2r051310>