Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2006 21:20:18 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 99698 for review
Message-ID:  <200606202120.k5KLKIU2074620@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99698

Change 99698 by jhb@jhb_mutex on 2006/06/20 21:19:46

	IFC @99696 - much linker loopback.

Affected files ...

.. //depot/projects/smpng/sys/amd64/amd64/pmap.c#60 integrate
.. //depot/projects/smpng/sys/amd64/linux32/linux32_proto.h#8 integrate
.. //depot/projects/smpng/sys/amd64/linux32/linux32_syscall.h#8 integrate
.. //depot/projects/smpng/sys/amd64/linux32/linux32_sysent.c#8 integrate
.. //depot/projects/smpng/sys/amd64/linux32/syscalls.master#8 integrate
.. //depot/projects/smpng/sys/arm/at91/at91rm92reg.h#3 integrate
.. //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#5 integrate
.. //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#39 integrate
.. //depot/projects/smpng/sys/dev/digi/digi.c#34 integrate
.. //depot/projects/smpng/sys/dev/mfi/mfi.c#7 integrate
.. //depot/projects/smpng/sys/i386/i386/pmap.c#99 integrate
.. //depot/projects/smpng/sys/i386/linux/linux_dummy.c#14 integrate
.. //depot/projects/smpng/sys/i386/linux/linux_proto.h#26 integrate
.. //depot/projects/smpng/sys/i386/linux/linux_syscall.h#25 integrate
.. //depot/projects/smpng/sys/i386/linux/linux_sysent.c#26 integrate
.. //depot/projects/smpng/sys/i386/linux/syscalls.master#26 integrate
.. //depot/projects/smpng/sys/kern/kern_linker.c#72 integrate
.. //depot/projects/smpng/sys/kern/subr_firmware.c#11 integrate
.. //depot/projects/smpng/sys/sys/linker.h#24 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#60 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.557 2006/06/15 01:01:05 ups Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.558 2006/06/20 20:52:10 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -1664,7 +1664,7 @@
 	static const struct timeval printinterval = { 60, 0 };
 	static struct timeval lastprint;
 	static vm_pindex_t colour;
-	int bit, field;
+	int bit, field, page_req;
 	pv_entry_t pv;
 	struct pv_chunk *pc;
 	vm_page_t m;
@@ -1697,7 +1697,8 @@
 		}
 	}
 	/* No free items, allocate another chunk */
-	m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ);
+	page_req = try ? VM_ALLOC_NORMAL : VM_ALLOC_SYSTEM; 
+	m = vm_page_alloc(NULL, colour, page_req | VM_ALLOC_NOOBJ);
 	if (m == NULL) {
 		if (try) {
 			pv_entry_count--;
@@ -2335,6 +2336,7 @@
 	vm_page_t m, mpte;
 	vm_pindex_t diff, psize;
 
+	VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED);
 	psize = atop(end - start);
 	mpte = NULL;
 	m = m_start;
@@ -2376,7 +2378,6 @@
 	    (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0,
 	    ("pmap_enter_quick_locked: managed mapping within the clean submap"));
 	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
-	VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
 	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
 
 	/*
@@ -2394,7 +2395,6 @@
 		if (mpte && (mpte->pindex == ptepindex)) {
 			mpte->wire_count++;
 		} else {
-	retry:
 			/*
 			 * Get the page directory entry
 			 */
@@ -2412,18 +2412,8 @@
 			} else {
 				mpte = _pmap_allocpte(pmap, ptepindex,
 				    M_NOWAIT);
-				if (mpte == NULL) {
-					PMAP_UNLOCK(pmap);
-					vm_page_busy(m);
-					vm_page_unlock_queues();
-					VM_OBJECT_UNLOCK(m->object);
-					VM_WAIT;
-					VM_OBJECT_LOCK(m->object);
-					vm_page_lock_queues();
-					vm_page_wakeup(m);
-					PMAP_LOCK(pmap);
-					goto retry;
-				}
+				if (mpte == NULL)
+					return (mpte);
 			}
 		}
 	} else {
@@ -2446,12 +2436,16 @@
 	}
 
 	/*
-	 * Enter on the PV list if part of our managed memory. Note that we
-	 * raise IPL while manipulating pv_table since pmap_enter can be
-	 * called at interrupt time.
+	 * Enter on the PV list if part of our managed memory.
 	 */
-	if ((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0)
-		pmap_insert_entry(pmap, va, m);
+	if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0 &&
+	    !pmap_try_insert_pv_entry(pmap, va, m)) {
+		if (mpte != NULL) {
+			pmap_unwire_pte_hold(pmap, va, mpte);
+			mpte = NULL;
+		}
+		return (mpte);
+	}
 
 	/*
 	 * Increment counters

==== //depot/projects/smpng/sys/amd64/linux32/linux32_proto.h#8 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.12 2006/06/13 18:48:29 netchild Exp $
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.10 2006/06/13 18:43:55 netchild Exp 
+ * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.13 2006/06/20 20:41:28 netchild Exp $
+ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.11 2006/06/20 20:38:44 netchild Exp 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -707,6 +707,174 @@
 struct linux_fadvise64_args {
 	register_t dummy;
 };
+struct linux_lookup_dcookie_args {
+	register_t dummy;
+};
+struct linux_epoll_create_args {
+	register_t dummy;
+};
+struct linux_epoll_ctl_args {
+	register_t dummy;
+};
+struct linux_epoll_wait_args {
+	register_t dummy;
+};
+struct linux_remap_file_pages_args {
+	register_t dummy;
+};
+struct linux_set_tid_address_args {
+	register_t dummy;
+};
+struct linux_timer_create_args {
+	register_t dummy;
+};
+struct linux_timer_settime_args {
+	register_t dummy;
+};
+struct linux_timer_gettime_args {
+	register_t dummy;
+};
+struct linux_timer_getoverrun_args {
+	register_t dummy;
+};
+struct linux_timer_delete_args {
+	register_t dummy;
+};
+struct linux_clock_settime_args {
+	register_t dummy;
+};
+struct linux_clock_gettime_args {
+	register_t dummy;
+};
+struct linux_clock_getres_args {
+	register_t dummy;
+};
+struct linux_clock_nanosleep_args {
+	register_t dummy;
+};
+struct linux_statfs64_args {
+	register_t dummy;
+};
+struct linux_fstatfs64_args {
+	register_t dummy;
+};
+struct linux_tgkill_args {
+	register_t dummy;
+};
+struct linux_utimes_args {
+	register_t dummy;
+};
+struct linux_fadvise64_64_args {
+	register_t dummy;
+};
+struct linux_mbind_args {
+	register_t dummy;
+};
+struct linux_get_mempolicy_args {
+	register_t dummy;
+};
+struct linux_set_mempolicy_args {
+	register_t dummy;
+};
+struct linux_mq_open_args {
+	register_t dummy;
+};
+struct linux_mq_unlink_args {
+	register_t dummy;
+};
+struct linux_mq_timedsend_args {
+	register_t dummy;
+};
+struct linux_mq_timedreceive_args {
+	register_t dummy;
+};
+struct linux_mq_notify_args {
+	register_t dummy;
+};
+struct linux_mq_getsetattr_args {
+	register_t dummy;
+};
+struct linux_kexec_load_args {
+	register_t dummy;
+};
+struct linux_waitid_args {
+	register_t dummy;
+};
+struct linux_add_key_args {
+	register_t dummy;
+};
+struct linux_request_key_args {
+	register_t dummy;
+};
+struct linux_keyctl_args {
+	register_t dummy;
+};
+struct linux_ioprio_set_args {
+	register_t dummy;
+};
+struct linux_ioprio_get_args {
+	register_t dummy;
+};
+struct linux_inotify_init_args {
+	register_t dummy;
+};
+struct linux_inotify_add_watch_args {
+	register_t dummy;
+};
+struct linux_inotify_rm_watch_args {
+	register_t dummy;
+};
+struct linux_migrate_pages_args {
+	register_t dummy;
+};
+struct linux_openat_args {
+	register_t dummy;
+};
+struct linux_mkdirat_args {
+	register_t dummy;
+};
+struct linux_mknodat_args {
+	register_t dummy;
+};
+struct linux_fchownat_args {
+	register_t dummy;
+};
+struct linux_futimesat_args {
+	register_t dummy;
+};
+struct linux_fstatat64_args {
+	register_t dummy;
+};
+struct linux_unlinkat_args {
+	register_t dummy;
+};
+struct linux_renameat_args {
+	register_t dummy;
+};
+struct linux_linkat_args {
+	register_t dummy;
+};
+struct linux_symlinkat_args {
+	register_t dummy;
+};
+struct linux_readlinkat_args {
+	register_t dummy;
+};
+struct linux_fchmodat_args {
+	register_t dummy;
+};
+struct linux_faccessat_args {
+	register_t dummy;
+};
+struct linux_pselect6_args {
+	register_t dummy;
+};
+struct linux_ppoll_args {
+	register_t dummy;
+};
+struct linux_unshare_args {
+	register_t dummy;
+};
 #define	nosys	linux_nosys
 int	linux_fork(struct thread *, struct linux_fork_args *);
 int	linux_open(struct thread *, struct linux_open_args *);
@@ -878,6 +1046,62 @@
 int	linux_lremovexattr(struct thread *, struct linux_lremovexattr_args *);
 int	linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *);
 int	linux_fadvise64(struct thread *, struct linux_fadvise64_args *);
+int	linux_lookup_dcookie(struct thread *, struct linux_lookup_dcookie_args *);
+int	linux_epoll_create(struct thread *, struct linux_epoll_create_args *);
+int	linux_epoll_ctl(struct thread *, struct linux_epoll_ctl_args *);
+int	linux_epoll_wait(struct thread *, struct linux_epoll_wait_args *);
+int	linux_remap_file_pages(struct thread *, struct linux_remap_file_pages_args *);
+int	linux_set_tid_address(struct thread *, struct linux_set_tid_address_args *);
+int	linux_timer_create(struct thread *, struct linux_timer_create_args *);
+int	linux_timer_settime(struct thread *, struct linux_timer_settime_args *);
+int	linux_timer_gettime(struct thread *, struct linux_timer_gettime_args *);
+int	linux_timer_getoverrun(struct thread *, struct linux_timer_getoverrun_args *);
+int	linux_timer_delete(struct thread *, struct linux_timer_delete_args *);
+int	linux_clock_settime(struct thread *, struct linux_clock_settime_args *);
+int	linux_clock_gettime(struct thread *, struct linux_clock_gettime_args *);
+int	linux_clock_getres(struct thread *, struct linux_clock_getres_args *);
+int	linux_clock_nanosleep(struct thread *, struct linux_clock_nanosleep_args *);
+int	linux_statfs64(struct thread *, struct linux_statfs64_args *);
+int	linux_fstatfs64(struct thread *, struct linux_fstatfs64_args *);
+int	linux_tgkill(struct thread *, struct linux_tgkill_args *);
+int	linux_utimes(struct thread *, struct linux_utimes_args *);
+int	linux_fadvise64_64(struct thread *, struct linux_fadvise64_64_args *);
+int	linux_mbind(struct thread *, struct linux_mbind_args *);
+int	linux_get_mempolicy(struct thread *, struct linux_get_mempolicy_args *);
+int	linux_set_mempolicy(struct thread *, struct linux_set_mempolicy_args *);
+int	linux_mq_open(struct thread *, struct linux_mq_open_args *);
+int	linux_mq_unlink(struct thread *, struct linux_mq_unlink_args *);
+int	linux_mq_timedsend(struct thread *, struct linux_mq_timedsend_args *);
+int	linux_mq_timedreceive(struct thread *, struct linux_mq_timedreceive_args *);
+int	linux_mq_notify(struct thread *, struct linux_mq_notify_args *);
+int	linux_mq_getsetattr(struct thread *, struct linux_mq_getsetattr_args *);
+int	linux_kexec_load(struct thread *, struct linux_kexec_load_args *);
+int	linux_waitid(struct thread *, struct linux_waitid_args *);
+int	linux_add_key(struct thread *, struct linux_add_key_args *);
+int	linux_request_key(struct thread *, struct linux_request_key_args *);
+int	linux_keyctl(struct thread *, struct linux_keyctl_args *);
+int	linux_ioprio_set(struct thread *, struct linux_ioprio_set_args *);
+int	linux_ioprio_get(struct thread *, struct linux_ioprio_get_args *);
+int	linux_inotify_init(struct thread *, struct linux_inotify_init_args *);
+int	linux_inotify_add_watch(struct thread *, struct linux_inotify_add_watch_args *);
+int	linux_inotify_rm_watch(struct thread *, struct linux_inotify_rm_watch_args *);
+int	linux_migrate_pages(struct thread *, struct linux_migrate_pages_args *);
+int	linux_openat(struct thread *, struct linux_openat_args *);
+int	linux_mkdirat(struct thread *, struct linux_mkdirat_args *);
+int	linux_mknodat(struct thread *, struct linux_mknodat_args *);
+int	linux_fchownat(struct thread *, struct linux_fchownat_args *);
+int	linux_futimesat(struct thread *, struct linux_futimesat_args *);
+int	linux_fstatat64(struct thread *, struct linux_fstatat64_args *);
+int	linux_unlinkat(struct thread *, struct linux_unlinkat_args *);
+int	linux_renameat(struct thread *, struct linux_renameat_args *);
+int	linux_linkat(struct thread *, struct linux_linkat_args *);
+int	linux_symlinkat(struct thread *, struct linux_symlinkat_args *);
+int	linux_readlinkat(struct thread *, struct linux_readlinkat_args *);
+int	linux_fchmodat(struct thread *, struct linux_fchmodat_args *);
+int	linux_faccessat(struct thread *, struct linux_faccessat_args *);
+int	linux_pselect6(struct thread *, struct linux_pselect6_args *);
+int	linux_ppoll(struct thread *, struct linux_ppoll_args *);
+int	linux_unshare(struct thread *, struct linux_unshare_args *);
 
 #ifdef COMPAT_43
 

==== //depot/projects/smpng/sys/amd64/linux32/linux32_syscall.h#8 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.12 2006/06/13 18:48:29 netchild Exp $
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.10 2006/06/13 18:43:55 netchild Exp 
+ * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.13 2006/06/20 20:41:28 netchild Exp $
+ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.11 2006/06/20 20:38:44 netchild Exp 
  */
 
 #define	LINUX_SYS_exit	1
@@ -221,4 +221,60 @@
 #define	LINUX_SYS_linux_fremovexattr	237
 #define	LINUX_SYS_linux_fadvise64	250
 #define	LINUX_SYS_exit_group	252
+#define	LINUX_SYS_linux_lookup_dcookie	253
+#define	LINUX_SYS_linux_epoll_create	254
+#define	LINUX_SYS_linux_epoll_ctl	255
+#define	LINUX_SYS_linux_epoll_wait	256
+#define	LINUX_SYS_linux_remap_file_pages	257
+#define	LINUX_SYS_linux_set_tid_address	258
+#define	LINUX_SYS_linux_timer_create	259
+#define	LINUX_SYS_linux_timer_settime	260
+#define	LINUX_SYS_linux_timer_gettime	261
+#define	LINUX_SYS_linux_timer_getoverrun	262
+#define	LINUX_SYS_linux_timer_delete	263
+#define	LINUX_SYS_linux_clock_settime	264
+#define	LINUX_SYS_linux_clock_gettime	265
+#define	LINUX_SYS_linux_clock_getres	266
+#define	LINUX_SYS_linux_clock_nanosleep	267
+#define	LINUX_SYS_linux_statfs64	268
+#define	LINUX_SYS_linux_fstatfs64	269
+#define	LINUX_SYS_linux_tgkill	270
+#define	LINUX_SYS_linux_utimes	271
+#define	LINUX_SYS_linux_fadvise64_64	272
+#define	LINUX_SYS_linux_mbind	274
+#define	LINUX_SYS_linux_get_mempolicy	275
+#define	LINUX_SYS_linux_set_mempolicy	276
+#define	LINUX_SYS_linux_mq_open	277
+#define	LINUX_SYS_linux_mq_unlink	278
+#define	LINUX_SYS_linux_mq_timedsend	279
+#define	LINUX_SYS_linux_mq_timedreceive	280
+#define	LINUX_SYS_linux_mq_notify	281
+#define	LINUX_SYS_linux_mq_getsetattr	282
+#define	LINUX_SYS_linux_kexec_load	283
+#define	LINUX_SYS_linux_waitid	284
+#define	LINUX_SYS_linux_add_key	286
+#define	LINUX_SYS_linux_request_key	287
+#define	LINUX_SYS_linux_keyctl	288
+#define	LINUX_SYS_linux_ioprio_set	289
+#define	LINUX_SYS_linux_ioprio_get	290
+#define	LINUX_SYS_linux_inotify_init	291
+#define	LINUX_SYS_linux_inotify_add_watch	292
+#define	LINUX_SYS_linux_inotify_rm_watch	293
+#define	LINUX_SYS_linux_migrate_pages	294
+#define	LINUX_SYS_linux_openat	295
+#define	LINUX_SYS_linux_mkdirat	296
+#define	LINUX_SYS_linux_mknodat	297
+#define	LINUX_SYS_linux_fchownat	298
+#define	LINUX_SYS_linux_futimesat	299
+#define	LINUX_SYS_linux_fstatat64	300
+#define	LINUX_SYS_linux_unlinkat	301
+#define	LINUX_SYS_linux_renameat	302
+#define	LINUX_SYS_linux_linkat	303
+#define	LINUX_SYS_linux_symlinkat	304
+#define	LINUX_SYS_linux_readlinkat	305
+#define	LINUX_SYS_linux_fchmodat	306
+#define	LINUX_SYS_linux_faccessat	307
+#define	LINUX_SYS_linux_pselect6	308
+#define	LINUX_SYS_linux_ppoll	309
+#define	LINUX_SYS_linux_unshare	310
 #define	LINUX_SYS_MAXSYSCALL	311

==== //depot/projects/smpng/sys/amd64/linux32/linux32_sysent.c#8 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.12 2006/06/13 18:48:29 netchild Exp $
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.10 2006/06/13 18:43:55 netchild Exp 
+ * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.13 2006/06/20 20:41:28 netchild Exp $
+ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.11 2006/06/20 20:38:44 netchild Exp 
  */
 
 #include <bsm/audit_kevents.h>
@@ -273,62 +273,62 @@
 	{ SYF_MPSAFE | 0, (sy_call_t *)linux_fadvise64, AUE_NULL },	/* 250 = linux_fadvise64 */
 	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 251 =  */
 	{ SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT },	/* 252 = exit_group */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 253 = linux_lookup_dcookie */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 254 = linux_epoll_create */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 255 = linux_epoll_ctl */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 256 = linux_epoll_wait */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 257 = linux_remap_file_pages */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 258 = linux_set_tid_address */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 259 = linux_timer_create */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 260 = linux_timer_settime */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 261 = linux_timer_gettime */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 262 = linux_timer_getoverrun */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 263 = linux_timer_delete */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 264 = linux_clock_settime */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 265 = linux_clock_gettime */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 266 = linux_clock_getres */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 267 = linux_clock_nanosleep */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 268 = linux_statfs64 */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 269 = linux_fstatfs64 */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 270 = linux_tgkill */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 271 = linux_utimes */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 272 = linux_fadvise64_64 */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 273 = linux_ni_syscall */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 274 = linux_mbind */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 275 = linux_get_mempolicy */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 276 = linux_set_mempolicy */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 277 = linux_mq_open */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 278 = linux_mq_unlink */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 279 = linux_mq_timedsend */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 280 = linux_mq_timedreceive */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 281 = linux_mq_notify */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 282 = linux_mq_getsetattr */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 283 = linux_kexec_load */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 284 = linux_waitid */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 285 = linux_ni_syscall */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 286 = linux_add_key */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 287 = linux_request_key */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 288 = linux_keyctl */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 289 = linux_ioprio_set */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 290 = linux_ioprio_get */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 291 = linux_inotify_init */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 292 = linux_inotify_add_watch */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 293 = linux_inotify_rm_watch */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 294 = linux_migrate_pages */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 295 = linux_openat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 296 = linux_mkdirat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 297 = linux_mknodat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 298 = linux_fchownat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 299 = linux_futimesat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 300 = linux_fstatat64 */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 301 = linux_unlinkat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 302 = linux_renameat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 303 = linux_linkat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 304 = linux_symlinkat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 305 = linux_readlinkat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 306 = linux_fchmodat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 307 = linux_faccessat */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 308 = linux_pselect6 */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 309 = linux_ppoll */
-	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 310 = linux_unshare */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL },	/* 253 = linux_lookup_dcookie */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_epoll_create, AUE_NULL },	/* 254 = linux_epoll_create */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL },	/* 255 = linux_epoll_ctl */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_epoll_wait, AUE_NULL },	/* 256 = linux_epoll_wait */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL },	/* 257 = linux_remap_file_pages */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_set_tid_address, AUE_NULL },	/* 258 = linux_set_tid_address */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_timer_create, AUE_NULL },	/* 259 = linux_timer_create */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_timer_settime, AUE_NULL },	/* 260 = linux_timer_settime */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_timer_gettime, AUE_NULL },	/* 261 = linux_timer_gettime */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_timer_getoverrun, AUE_NULL },	/* 262 = linux_timer_getoverrun */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_timer_delete, AUE_NULL },	/* 263 = linux_timer_delete */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME },	/* 264 = linux_clock_settime */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_clock_gettime, AUE_NULL },	/* 265 = linux_clock_gettime */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_clock_getres, AUE_NULL },	/* 266 = linux_clock_getres */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_clock_nanosleep, AUE_NULL },	/* 267 = linux_clock_nanosleep */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_statfs64, AUE_NULL },	/* 268 = linux_statfs64 */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_fstatfs64, AUE_NULL },	/* 269 = linux_fstatfs64 */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_tgkill, AUE_NULL },	/* 270 = linux_tgkill */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_utimes, AUE_NULL },	/* 271 = linux_utimes */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL },	/* 272 = linux_fadvise64_64 */
+	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 273 =  */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mbind, AUE_NULL },	/* 274 = linux_mbind */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL },	/* 275 = linux_get_mempolicy */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL },	/* 276 = linux_set_mempolicy */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mq_open, AUE_NULL },	/* 277 = linux_mq_open */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mq_unlink, AUE_NULL },	/* 278 = linux_mq_unlink */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mq_timedsend, AUE_NULL },	/* 279 = linux_mq_timedsend */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mq_timedreceive, AUE_NULL },	/* 280 = linux_mq_timedreceive */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mq_notify, AUE_NULL },	/* 281 = linux_mq_notify */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mq_getsetattr, AUE_NULL },	/* 282 = linux_mq_getsetattr */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_kexec_load, AUE_NULL },	/* 283 = linux_kexec_load */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_waitid, AUE_NULL },	/* 284 = linux_waitid */
+	{ 0, (sy_call_t *)nosys, AUE_NULL },			/* 285 =  */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_add_key, AUE_NULL },	/* 286 = linux_add_key */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_request_key, AUE_NULL },	/* 287 = linux_request_key */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_keyctl, AUE_NULL },	/* 288 = linux_keyctl */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_ioprio_set, AUE_NULL },	/* 289 = linux_ioprio_set */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_ioprio_get, AUE_NULL },	/* 290 = linux_ioprio_get */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_inotify_init, AUE_NULL },	/* 291 = linux_inotify_init */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_inotify_add_watch, AUE_NULL },	/* 292 = linux_inotify_add_watch */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_inotify_rm_watch, AUE_NULL },	/* 293 = linux_inotify_rm_watch */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_migrate_pages, AUE_NULL },	/* 294 = linux_migrate_pages */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_openat, AUE_NULL },	/* 295 = linux_openat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mkdirat, AUE_NULL },	/* 296 = linux_mkdirat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_mknodat, AUE_NULL },	/* 297 = linux_mknodat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_fchownat, AUE_NULL },	/* 298 = linux_fchownat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_futimesat, AUE_NULL },	/* 299 = linux_futimesat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_fstatat64, AUE_NULL },	/* 300 = linux_fstatat64 */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_unlinkat, AUE_NULL },	/* 301 = linux_unlinkat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_renameat, AUE_NULL },	/* 302 = linux_renameat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_linkat, AUE_NULL },	/* 303 = linux_linkat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_symlinkat, AUE_NULL },	/* 304 = linux_symlinkat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_readlinkat, AUE_NULL },	/* 305 = linux_readlinkat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_fchmodat, AUE_NULL },	/* 306 = linux_fchmodat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_faccessat, AUE_NULL },	/* 307 = linux_faccessat */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_pselect6, AUE_NULL },	/* 308 = linux_pselect6 */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_ppoll, AUE_NULL },	/* 309 = linux_ppoll */
+	{ SYF_MPSAFE | 0, (sy_call_t *)linux_unshare, AUE_NULL },	/* 310 = linux_unshare */
 };

==== //depot/projects/smpng/sys/amd64/linux32/syscalls.master#8 (text+ko) ====

@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.10 2006/06/13 18:43:55 netchild Exp $
+ $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.11 2006/06/20 20:38:44 netchild Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 ; System call name/number master file (or rather, slave, from LINUX).
@@ -418,61 +418,61 @@
 251	AUE_NULL	UNIMPL
 252	AUE_EXIT	MNOPROTO { void sys_exit(int rval); } exit_group \
 				    sys_exit_args void
-253	AUE_NULL	UNIMPL	linux_lookup_dcookie
-254	AUE_NULL	UNIMPL	linux_epoll_create
-255	AUE_NULL	UNIMPL	linux_epoll_ctl
-256	AUE_NULL	UNIMPL	linux_epoll_wait
-257	AUE_NULL	UNIMPL	linux_remap_file_pages
-258	AUE_NULL	UNIMPL	linux_set_tid_address
-259	AUE_NULL	UNIMPL	linux_timer_create
-260	AUE_NULL	UNIMPL	linux_timer_settime
-261	AUE_NULL	UNIMPL	linux_timer_gettime
-262	AUE_NULL	UNIMPL	linux_timer_getoverrun
-263	AUE_NULL	UNIMPL	linux_timer_delete
-264	AUE_CLOCK_SETTIME	UNIMPL	linux_clock_settime
-265	AUE_NULL	UNIMPL	linux_clock_gettime
-266	AUE_NULL	UNIMPL	linux_clock_getres
-267	AUE_NULL	UNIMPL	linux_clock_nanosleep
-268	AUE_NULL	UNIMPL	linux_statfs64
-269	AUE_NULL	UNIMPL	linux_fstatfs64
-270	AUE_NULL	UNIMPL	linux_tgkill	/* 270 */
-271	AUE_NULL	UNIMPL	linux_utimes
-272	AUE_NULL	UNIMPL	linux_fadvise64_64
-273	AUE_NULL	UNIMPL	linux_ni_syscall	/* linux_vserver */
-274	AUE_NULL	UNIMPL	linux_mbind
-275	AUE_NULL	UNIMPL	linux_get_mempolicy
-276	AUE_NULL	UNIMPL	linux_set_mempolicy
-277	AUE_NULL	UNIMPL	linux_mq_open
-278	AUE_NULL	UNIMPL	linux_mq_unlink
-279	AUE_NULL	UNIMPL	linux_mq_timedsend
-280	AUE_NULL	UNIMPL	linux_mq_timedreceive	/* 280 */
-281	AUE_NULL	UNIMPL	linux_mq_notify
-282	AUE_NULL	UNIMPL	linux_mq_getsetattr
-283	AUE_NULL	UNIMPL	linux_kexec_load
-284	AUE_NULL	UNIMPL	linux_waitid
-285	AUE_NULL	UNIMPL	linux_ni_syscall		/* 285 */ /* available */
-286	AUE_NULL	UNIMPL	linux_add_key
-287	AUE_NULL	UNIMPL	linux_request_key
-288	AUE_NULL	UNIMPL	linux_keyctl
-289	AUE_NULL	UNIMPL	linux_ioprio_set
-290	AUE_NULL	UNIMPL	linux_ioprio_get		/* 290 */
-291	AUE_NULL	UNIMPL	linux_inotify_init
-292	AUE_NULL	UNIMPL	linux_inotify_add_watch
-293	AUE_NULL	UNIMPL	linux_inotify_rm_watch
-294	AUE_NULL	UNIMPL	linux_migrate_pages
-295	AUE_NULL	UNIMPL	linux_openat		/* 295 */
-296	AUE_NULL	UNIMPL	linux_mkdirat
-297	AUE_NULL	UNIMPL	linux_mknodat
-298	AUE_NULL	UNIMPL	linux_fchownat
-299	AUE_NULL	UNIMPL	linux_futimesat
-300	AUE_NULL	UNIMPL	linux_fstatat64		/* 300 */
-301	AUE_NULL	UNIMPL	linux_unlinkat
-302	AUE_NULL	UNIMPL	linux_renameat
-303	AUE_NULL	UNIMPL	linux_linkat
-304	AUE_NULL	UNIMPL	linux_symlinkat
-305	AUE_NULL	UNIMPL	linux_readlinkat		/* 305 */
-306	AUE_NULL	UNIMPL	linux_fchmodat
-307	AUE_NULL	UNIMPL	linux_faccessat
-308	AUE_NULL	UNIMPL	linux_pselect6
-309	AUE_NULL	UNIMPL	linux_ppoll
-310	AUE_NULL	UNIMPL	linux_unshare		/* 310 */
+253	AUE_NULL	MSTD	{ int linux_lookup_dcookie(void); }
+254	AUE_NULL	MSTD	{ int linux_epoll_create(void); }
+255	AUE_NULL	MSTD	{ int linux_epoll_ctl(void); }
+256	AUE_NULL	MSTD	{ int linux_epoll_wait(void); }
+257	AUE_NULL	MSTD	{ int linux_remap_file_pages(void); }
+258	AUE_NULL	MSTD	{ int linux_set_tid_address(void); }
+259	AUE_NULL	MSTD	{ int linux_timer_create(void); }
+260	AUE_NULL	MSTD	{ int linux_timer_settime(void); }
+261	AUE_NULL	MSTD	{ int linux_timer_gettime(void); }
+262	AUE_NULL	MSTD	{ int linux_timer_getoverrun(void); }
+263	AUE_NULL	MSTD	{ int linux_timer_delete(void); }
+264	AUE_CLOCK_SETTIME	MSTD	{ int linux_clock_settime(void); }
+265	AUE_NULL	MSTD	{ int linux_clock_gettime(void); }
+266	AUE_NULL	MSTD	{ int linux_clock_getres(void); }
+267	AUE_NULL	MSTD	{ int linux_clock_nanosleep(void); }
+268	AUE_NULL	MSTD	{ int linux_statfs64(void); }
+269	AUE_NULL	MSTD	{ int linux_fstatfs64(void); }
+270	AUE_NULL	MSTD	{ int linux_tgkill(void); }
+271	AUE_NULL	MSTD	{ int linux_utimes(void); }
+272	AUE_NULL	MSTD	{ int linux_fadvise64_64(void); }
+273	AUE_NULL	UNIMPL
+274	AUE_NULL	MSTD	{ int linux_mbind(void); }
+275	AUE_NULL	MSTD	{ int linux_get_mempolicy(void); }
+276	AUE_NULL	MSTD	{ int linux_set_mempolicy(void); }
+277	AUE_NULL	MSTD	{ int linux_mq_open(void); }
+278	AUE_NULL	MSTD	{ int linux_mq_unlink(void); }
+279	AUE_NULL	MSTD	{ int linux_mq_timedsend(void); }
+280	AUE_NULL	MSTD	{ int linux_mq_timedreceive(void); }
+281	AUE_NULL	MSTD	{ int linux_mq_notify(void); }
+282	AUE_NULL	MSTD	{ int linux_mq_getsetattr(void); }
+283	AUE_NULL	MSTD	{ int linux_kexec_load(void); }
+284	AUE_NULL	MSTD	{ int linux_waitid(void); }
+285	AUE_NULL	UNIMPL
+286	AUE_NULL	MSTD	{ int linux_add_key(void); }
+287	AUE_NULL	MSTD	{ int linux_request_key(void); }
+288	AUE_NULL	MSTD	{ int linux_keyctl(void); }
+289	AUE_NULL	MSTD	{ int linux_ioprio_set(void); }
+290	AUE_NULL	MSTD	{ int linux_ioprio_get(void); }
+291	AUE_NULL	MSTD	{ int linux_inotify_init(void); }
+292	AUE_NULL	MSTD	{ int linux_inotify_add_watch(void); }
+293	AUE_NULL	MSTD	{ int linux_inotify_rm_watch(void); }
+294	AUE_NULL	MSTD	{ int linux_migrate_pages(void); }
+295	AUE_NULL	MSTD	{ int linux_openat(void); }
+296	AUE_NULL	MSTD	{ int linux_mkdirat(void); }
+297	AUE_NULL	MSTD	{ int linux_mknodat(void); }
+298	AUE_NULL	MSTD	{ int linux_fchownat(void); }
+299	AUE_NULL	MSTD	{ int linux_futimesat(void); }
+300	AUE_NULL	MSTD	{ int linux_fstatat64(void); }
+301	AUE_NULL	MSTD	{ int linux_unlinkat(void); }
+302	AUE_NULL	MSTD	{ int linux_renameat(void); }
+303	AUE_NULL	MSTD	{ int linux_linkat(void); }
+304	AUE_NULL	MSTD	{ int linux_symlinkat(void); }
+305	AUE_NULL	MSTD	{ int linux_readlinkat(void); }
+306	AUE_NULL	MSTD	{ int linux_fchmodat(void); }
+307	AUE_NULL	MSTD	{ int linux_faccessat(void); }
+308	AUE_NULL	MSTD	{ int linux_pselect6(void); }
+309	AUE_NULL	MSTD	{ int linux_ppoll(void); }
+310	AUE_NULL	MSTD	{ int linux_unshare(void); }

==== //depot/projects/smpng/sys/arm/at91/at91rm92reg.h#3 (text) ====

@@ -22,7 +22,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* $FreeBSD: src/sys/arm/at91/at91rm92reg.h,v 1.2 2006/03/18 01:38:25 imp Exp $ */
+/* $FreeBSD: src/sys/arm/at91/at91rm92reg.h,v 1.3 2006/06/20 20:13:40 imp Exp $ */
 
 #ifndef AT91RM92REG_H_
 #define AT91RM92REG_H_
@@ -341,4 +341,44 @@
 
 #define AT91C_MASTER_CLOCK	60000000
 
+/* SDRAMC */
+
+#define AT91RM92_SDRAMC_BASE	0xfffff90
+#define AT91RM92_SDRAMC_MR	0x00
+#define AT91RM92_SDRAMC_MR_MODE_NORMAL	0
+#define AT91RM92_SDRAMC_MR_MODE_NOP	1
+#define AT91RM92_SDRAMC_MR_MODE_PRECHARGE 2
+#define AT91RM92_SDRAMC_MR_MODE_LOAD_MODE_REGISTER 3
+#define AT91RM92_SDRAMC_MR_MODE_REFRESH	4
+#define AT91RM92_SDRAMC_MR_DBW_16	0x10
+#define AT91RM92_SDRAMC_TR	0x04
+#define AT91RM92_SDRAMC_CR	0x08
+#define AT91RM92_SDRAMC_CR_NC_8		0x0
+#define AT91RM92_SDRAMC_CR_NC_9		0x1
+#define AT91RM92_SDRAMC_CR_NC_10	0x2
+#define AT91RM92_SDRAMC_CR_NC_11	0x3
+#define AT91RM92_SDRAMC_CR_NC_MASK	0x00000003
+#define AT91RM92_SDRAMC_CR_NR_11	0x0
+#define AT91RM92_SDRAMC_CR_NR_12	0x4
+#define AT91RM92_SDRAMC_CR_NR_13	0x8
+#define AT91RM92_SDRAMC_CR_NR_RES	0xc
+#define AT91RM92_SDRAMC_CR_NR_MASK	0x0000000c
+#define AT91RM92_SDRAMC_CR_NB_2		0x00
+#define AT91RM92_SDRAMC_CR_NB_4		0x10
+#define AT91RM92_SDRAMC_CR_NB_MASK	0x00000010
+#define AT91RM92_SDRAMC_CR_NCAS_MASK	0x00000060
+#define AT91RM92_SDRAMC_CR_TWR_MASK	0x00000780
+#define AT91RM92_SDRAMC_CR_TRC_MASK	0x00007800
+#define AT91RM92_SDRAMC_CR_TRP_MASK	0x00078000
+#define AT91RM92_SDRAMC_CR_TRCD_MASK	0x00780000
+#define AT91RM92_SDRAMC_CR_TRAS_MASK	0x07800000
+#define AT91RM92_SDRAMC_CR_TXSR_MASK	0x78000000
+#define AT91RM92_SDRAMC_SRR	0x0c
+#define AT91RM92_SDRAMC_LPR	0x10
+#define AT91RM92_SDRAMC_IER	0x14
+#define AT91RM92_SDRAMC_IDR	0x18
+#define AT91RM92_SDRAMC_IMR	0x1c
+#define AT91RM92_SDRAMC_ISR	0x20
+#define AT91RM92_SDRAMC_IER_RES	0x1
+
 #endif /* AT91RM92REG_H_ */

==== //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#5 (text) ====

@@ -47,7 +47,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.6 2006/06/12 22:57:24 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.7 2006/06/20 20:13:40 imp Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -182,6 +182,24 @@
 extern vm_offset_t ksym_start, ksym_end;
 #endif
 
+static int
+board_init(void)
+{
+	uint32_t memsize;
+	uint32_t *SDRAMC = (uint32_t *)(AT91RM92_BASE + AT91RM92_SDRAMC_BASE);
+	uint32_t cr, mr;
+	int banks, rows, cols, bw; /* log2 size */
+	
+	cr = SDRAMC[AT91RM92_SDRAMC_CR / 4];
+	mr = SDRAMC[AT91RM92_SDRAMC_MR / 4];
+	bw = (mr & AT91RM92_SDRAMC_MR_DBW_16) ? 1 : 2;
+	banks = (cr & AT91RM92_SDRAMC_CR_NB_4) ? 2 : 1;
+	rows = ((cr & AT91RM92_SDRAMC_CR_NR_MASK) >> 2) + 11;
+	cols = (cr & AT91RM92_SDRAMC_CR_NC_MASK) + 8;
+	memsize = 1 << (cols + rows + banks + bw);
+	return (memsize);
+}
+
 void *
 initarm(void *arg, void *arg2)
 {
@@ -192,7 +210,7 @@
 	vm_offset_t afterkern;
 	int i = 0;
 	uint32_t fake_preload[35];
-	uint32_t memsize = 32 * 1024 * 1024;
+	uint32_t memsize;
 	vm_offset_t lastaddr;
 #ifdef DDB
 	vm_offset_t zstart = 0, zend = 0;
@@ -341,7 +359,7 @@
 	cpu_tlb_flushID();
 	cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2));
 	cninit();
-
+	memsize = board_init();
 	/*
 	 * Pages were allocated during the secondary bootstrap for the
 	 * stacks for different CPU modes.

==== //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#39 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.104 2005/12/16 17:27:45 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.105 2006/06/20 20:37:17 jhb Exp $");
 
 /*
  * This file implements a translation layer between the BSD networking

==== //depot/projects/smpng/sys/dev/digi/digi.c#34 (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/digi/digi.c,v 1.61 2006/05/25 22:04:46 jhb Exp $
+ * $FreeBSD: src/sys/dev/digi/digi.c,v 1.62 2006/06/20 20:54:13 jhb Exp $
  */
 
 /*-

==== //depot/projects/smpng/sys/dev/mfi/mfi.c#7 (text) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.7 2006/06/19 05:35:56 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.9 2006/06/20 21:06:05 ps Exp $");
 
 #include "opt_mfi.h"
 
@@ -58,10 +58,12 @@
 static int	mfi_polled_command(struct mfi_softc *, struct mfi_command *);
 static int	mfi_get_controller_info(struct mfi_softc *);
 static int	mfi_get_log_state(struct mfi_softc *,
-		    struct mfi_evt_log_state *);
+		    struct mfi_evt_log_state **);
 #ifdef NOTYET
 static int	mfi_get_entry(struct mfi_softc *, int);
 #endif
+static int	mfi_dcmd_command(struct mfi_softc *, struct mfi_command **,
+		    uint32_t, void **, size_t);
 static void	mfi_data_cb(void *, bus_dma_segment_t *, int, int);
 static void	mfi_startup(void *arg);
 static void	mfi_intr(void *arg);
@@ -441,6 +443,53 @@
 }
 
 static int
+mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, uint32_t opcode,
+    void **bufp, size_t bufsize)
+{
+	struct mfi_command *cm;
+	struct mfi_dcmd_frame *dcmd;
+	void *buf = NULL;
+	
+	mtx_assert(&sc->mfi_io_lock, MA_OWNED);
+	
+	cm = mfi_dequeue_free(sc);
+	if (cm == NULL)
+		return (EBUSY);
+
+	if ((bufsize > 0) && (bufp != NULL)) {
+		if (*bufp == NULL) {
+			buf = malloc(bufsize, M_MFIBUF, M_NOWAIT|M_ZERO);
+			if (buf == NULL) {
+				mfi_release_command(cm);
+				return (ENOMEM);
+			}
+			*bufp = buf;
+		} else {
+			buf = *bufp;
+		}
+	}
+
+	dcmd =  &cm->cm_frame->dcmd;
+	bzero(dcmd->mbox, MFI_MBOX_SIZE);
+	dcmd->header.cmd = MFI_CMD_DCMD;
+	dcmd->header.timeout = 0;
+	dcmd->header.flags = 0;
+	dcmd->header.data_len = bufsize;
+	dcmd->opcode = opcode;
+	cm->cm_sg = &dcmd->sgl;
+	cm->cm_total_frame_size = MFI_DCMD_FRAME_SIZE;
+	cm->cm_flags = 0;
+	cm->cm_data = buf;
+	cm->cm_private = buf;
+	cm->cm_len = bufsize;
+
+	*cmp = cm;
+	if ((bufp != NULL) && (*bufp == NULL) && (buf != NULL))
+		*bufp = buf;
+	return (0);
+}
+
+static int
 mfi_comms_init(struct mfi_softc *sc)
 {
 	struct mfi_command *cm;
@@ -483,35 +532,20 @@
 static int
 mfi_get_controller_info(struct mfi_softc *sc)
 {
-	struct mfi_command *cm;
-	struct mfi_dcmd_frame *dcmd;
-	struct mfi_ctrl_info *ci;
+	struct mfi_command *cm = NULL;
+	struct mfi_ctrl_info *ci = NULL;
 	uint32_t max_sectors_1, max_sectors_2;
 	int error;
 
-	if ((cm = mfi_dequeue_free(sc)) == NULL)
-		return (EBUSY);
-
-	ci = malloc(sizeof(struct mfi_ctrl_info), M_MFIBUF, M_NOWAIT | M_ZERO);
-	if (ci == NULL) {
-		mfi_release_command(cm);
-		return (ENOMEM);
-	}
-
-	dcmd = &cm->cm_frame->dcmd;
-	bzero(dcmd->mbox, MFI_MBOX_SIZE);
-	dcmd->header.cmd = MFI_CMD_DCMD;
-	dcmd->header.timeout = 0;
-	dcmd->header.data_len = sizeof(struct mfi_ctrl_info);
-	dcmd->opcode = MFI_DCMD_CTRL_GETINFO;
-	cm->cm_sg = &dcmd->sgl;
-	cm->cm_total_frame_size = MFI_DCMD_FRAME_SIZE;
+	mtx_lock(&sc->mfi_io_lock);
+	error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_GETINFO,
+	    (void **)&ci, sizeof(*ci));
+	if (error)
+		goto out;
 	cm->cm_flags = MFI_CMD_DATAIN | MFI_CMD_POLLED;
-	cm->cm_data = ci;
-	cm->cm_len = sizeof(struct mfi_ctrl_info);
 
 	if ((error = mfi_mapcmd(sc, cm)) != 0) {
-		device_printf(sc->mfi_dev, "Controller info buffer map failed");
+		device_printf(sc->mfi_dev, "Controller info buffer map failed\n");
 		free(ci, M_MFIBUF);
 		mfi_release_command(cm);
 		return (error);
@@ -522,9 +556,8 @@
 		device_printf(sc->mfi_dev, "Failed to get controller info\n");
 		sc->mfi_max_io = (sc->mfi_total_sgl - 1) * PAGE_SIZE /
 		    MFI_SECTOR_LEN;
-		free(ci, M_MFIBUF);
-		mfi_release_command(cm);
-		return (0);
+		error = 0;
+		goto out;
 	}
 
 	bus_dmamap_sync(sc->mfi_buffer_dmat, cm->cm_dmamap,
@@ -535,55 +568,45 @@
 	max_sectors_2 = ci->max_request_size;
 	sc->mfi_max_io = min(max_sectors_1, max_sectors_2);
 
-	free(ci, M_MFIBUF);
-	mfi_release_command(cm);
-
+out:
+	if (ci)
+		free(ci, M_MFIBUF);
+	if (cm)
+		mfi_release_command(cm);

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



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