From owner-p4-projects@FreeBSD.ORG Tue Mar 9 11:17:10 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F3B0816A4D0; Tue, 9 Mar 2004 11:17:09 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A577716A4CE for ; Tue, 9 Mar 2004 11:17:09 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93FFF43D1F for ; Tue, 9 Mar 2004 11:17:09 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i29JH9Ge080398 for ; Tue, 9 Mar 2004 11:17:09 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i29JH8TN080385 for perforce@freebsd.org; Tue, 9 Mar 2004 11:17:08 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 9 Mar 2004 11:17:08 -0800 (PST) Message-Id: <200403091917.i29JH8TN080385@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 48511 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 19:17:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=48511 Change 48511 by rwatson@rwatson_paprika on 2004/03/09 11:16:37 Integrate netperf_socket: pmap_pinit2() removed acpi type fixes netgraph atm magic ndis pieces vinum type fixes more geom_concat geom orphan fixes More giant pushdown/removal in fork() loadav() now runs MPSAFE cpus are now hung off busdma by acpi configurable policy limits on hard links in vfs pf now hooked up if_disc locking (loopback) if_loop locking (loopback) netgraph getifindex PIM registration fix Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#2 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/local_apic.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/include/cpufunc.h#4 integrate .. //depot/projects/netperf_socket/sys/boot/efi/libefi/efi_console.c#2 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#6 integrate .. //depot/projects/netperf_socket/sys/conf/files#7 integrate .. //depot/projects/netperf_socket/sys/conf/options#4 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/if_ndis/if_ndis_pci.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/vinum/vinumext.h#2 integrate .. //depot/projects/netperf_socket/sys/dev/vinum/vinumio.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/vinum/vinumrequest.c#2 integrate .. //depot/projects/netperf_socket/sys/geom/concat/g_concat.c#5 integrate .. //depot/projects/netperf_socket/sys/geom/concat/g_concat.h#5 integrate .. //depot/projects/netperf_socket/sys/geom/geom_subr.c#3 integrate .. //depot/projects/netperf_socket/sys/i386/i386/elan-mmcr.c#4 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#3 integrate .. //depot/projects/netperf_socket/sys/i386/i386/vm_machdep.c#2 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/pmap.c#3 integrate .. //depot/projects/netperf_socket/sys/kern/kern_fork.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_synch.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/subr_smp.c#3 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_syscalls.c#3 integrate .. //depot/projects/netperf_socket/sys/modules/Makefile#4 integrate .. //depot/projects/netperf_socket/sys/modules/netgraph/atmllc/Makefile#1 branch .. //depot/projects/netperf_socket/sys/net/if_disc.c#2 integrate .. //depot/projects/netperf_socket/sys/net/if_loop.c#2 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_atmllc.c#1 branch .. //depot/projects/netperf_socket/sys/netgraph/ng_atmllc.h#1 branch .. //depot/projects/netperf_socket/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_iface.h#2 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_mroute.c#4 integrate .. //depot/projects/netperf_socket/sys/netinet/pim.h#2 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/pmap.c#4 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/pmap.c#2 integrate .. //depot/projects/netperf_socket/sys/sys/param.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/pcpu.h#2 integrate .. //depot/projects/netperf_socket/sys/vm/pmap.h#2 integrate .. //depot/projects/netperf_socket/sys/vm/vm_glue.c#4 integrate .. //depot/projects/netperf_socket/sys/vm/vm_map.c#3 integrate .. //depot/projects/netperf_socket/sys/vm/vm_object.c#3 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#2 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.139 2003/10/03 22:46:52 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.140 2004/03/07 21:06:46 alc Exp $"); #include #include @@ -1109,18 +1109,6 @@ mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); -} - -/* - * Wire in kernel global address entries. To avoid a race condition - * between pmap initialization and pmap_growkernel, this procedure - * should be called after the vmspace is attached to the process - * but before this pmap is activated. - */ -void -pmap_pinit2(pmap) - struct pmap *pmap; -{ bcopy(PTlev1 + K1SEGLEV1I, pmap->pm_lev1 + K1SEGLEV1I, nklev2 * PTESIZE); } ==== //depot/projects/netperf_socket/sys/amd64/amd64/local_apic.c#3 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.7 2004/01/30 00:24:45 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.8 2004/03/08 00:15:29 peter Exp $"); #include #include @@ -691,8 +691,8 @@ intr_restore(eflags); } +#define BEFORE_SPIN 1000000 #ifdef DETECT_DEADLOCK -#define BEFORE_SPIN 1000000 #define AFTER_SPIN 1000 #endif @@ -723,11 +723,9 @@ destfield = dest; } -#ifdef DETECT_DEADLOCK - /* Check for an earlier stuck IPI. */ + /* Wait for an earlier IPI to finish. */ if (!lapic_ipi_wait(BEFORE_SPIN)) panic("APIC: Previous IPI is stuck"); -#endif lapic_ipi_raw(icrlo, destfield); ==== //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.604 2004/02/25 23:12:39 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.605 2004/03/08 00:16:52 peter Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1162,6 +1162,7 @@ pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); + PCPU_SET(curpcb, thread0.td_pcb); PCPU_SET(tssp, &common_tss[0]); /* ==== //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.234 2004/01/30 00:24:45 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.235 2004/03/08 00:25:03 peter Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#3 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.452 2004/02/05 00:11:05 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.453 2004/03/07 21:06:47 alc Exp $"); /* * Manages physical address maps. @@ -1103,19 +1103,6 @@ } /* - * Wire in kernel global address entries. To avoid a race condition - * between pmap initialization and pmap_growkernel, this procedure - * should be called after the vmspace is attached to the process - * but before this pmap is activated. - */ -void -pmap_pinit2(pmap) - struct pmap *pmap; -{ - /* XXX: Remove this stub when no longer called */ -} - -/* * this routine is called if the page table page is not * mapped correctly. * ==== //depot/projects/netperf_socket/sys/amd64/amd64/trap.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.272 2004/01/29 00:05:03 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.273 2004/03/08 00:17:27 peter Exp $"); /* * AMD64 Trap and System call handling @@ -371,8 +371,7 @@ frame.tf_rip = (long)doreti_iret_fault; goto out; } - if (PCPU_GET(curpcb) != NULL && - PCPU_GET(curpcb)->pcb_onfault != NULL) { + if (PCPU_GET(curpcb)->pcb_onfault != NULL) { frame.tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; goto out; @@ -555,7 +554,6 @@ nogo: if (!usermode) { if (td->td_intr_nesting_level == 0 && - PCPU_GET(curpcb) != NULL && PCPU_GET(curpcb)->pcb_onfault != NULL) { frame->tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; return (0); ==== //depot/projects/netperf_socket/sys/amd64/include/cpufunc.h#4 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.140 2004/03/05 09:19:59 le Exp $ + * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.141 2004/03/08 00:24:15 peter Exp $ */ /* @@ -43,13 +43,8 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ -#include -#include - -struct thread; struct region_descriptor; -__BEGIN_DECLS #define readb(va) (*(volatile u_int8_t *) (va)) #define readw(va) (*(volatile u_int16_t *) (va)) #define readl(va) (*(volatile u_int32_t *) (va)) @@ -563,21 +558,18 @@ } #endif -/* void lidt(struct region_descriptor *addr); */ static __inline void lidt(struct region_descriptor *addr) { __asm __volatile("lidt (%0)" : : "r" (addr)); } -/* void lldt(u_short sel); */ static __inline void lldt(u_short sel) { __asm __volatile("lldt %0" : : "r" (sel)); } -/* void ltr(u_short sel); */ static __inline void ltr(u_short sel) { @@ -717,30 +709,37 @@ int breakpoint(void); u_int bsfl(u_int mask); u_int bsrl(u_int mask); -void cpu_invlpg(u_long addr); -void cpu_invlpg_range(u_long start, u_long end); void disable_intr(void); void do_cpuid(u_int ax, u_int *p); void enable_intr(void); void halt(void); +void ia32_pause(void); u_char inb(u_int port); u_int inl(u_int port); void insb(u_int port, void *addr, size_t cnt); void insl(u_int port, void *addr, size_t cnt); void insw(u_int port, void *addr, size_t cnt); +register_t intr_disable(void); +void intr_restore(register_t rf); void invd(void); void invlpg(u_int addr); -void invlpg_range(u_int start, u_int end); void invltlb(void); u_short inw(u_int port); -void load_cr0(u_int cr0); -void load_cr3(u_int cr3); -void load_cr4(u_int cr4); +void lidt(struct region_descriptor *addr); +void lldt(u_short sel); +void load_cr0(u_long cr0); +void load_cr3(u_long cr3); +void load_cr4(u_long cr4); +void load_dr0(u_int64_t dr0); +void load_dr1(u_int64_t dr1); +void load_dr2(u_int64_t dr2); +void load_dr3(u_int64_t dr3); +void load_dr4(u_int64_t dr4); +void load_dr5(u_int64_t dr5); +void load_dr6(u_int64_t dr6); +void load_dr7(u_int64_t dr7); void load_fs(u_int sel); void load_gs(u_int sel); -struct region_descriptor; -void lidt(struct region_descriptor *addr); -void lldt(u_short sel); void ltr(u_short sel); void outb(u_int port, u_char data); void outl(u_int port, u_int data); @@ -748,43 +747,30 @@ void outsl(u_int port, const void *addr, size_t cnt); void outsw(u_int port, const void *addr, size_t cnt); void outw(u_int port, u_short data); -void ia32_pause(void); -u_int rcr0(void); -u_int rcr2(void); -u_int rcr3(void); -u_int rcr4(void); -u_int rfs(void); -u_int rgs(void); +u_long rcr0(void); +u_long rcr2(void); +u_long rcr3(void); +u_long rcr4(void); u_int64_t rdmsr(u_int msr); u_int64_t rdpmc(u_int pmc); +u_int64_t rdr0(void); +u_int64_t rdr1(void); +u_int64_t rdr2(void); +u_int64_t rdr3(void); +u_int64_t rdr4(void); +u_int64_t rdr5(void); +u_int64_t rdr6(void); +u_int64_t rdr7(void); u_int64_t rdtsc(void); u_int read_rflags(void); +u_int rfs(void); +u_int rgs(void); void wbinvd(void); void write_rflags(u_int rf); void wrmsr(u_int msr, u_int64_t newval); -u_int64_t rdr0(void); -void load_dr0(u_int64_t dr0); -u_int64_t rdr1(void); -void load_dr1(u_int64_t dr1); -u_int64_t rdr2(void); -void load_dr2(u_int64_t dr2); -u_int64_t rdr3(void); -void load_dr3(u_int64_t dr3); -u_int64_t rdr4(void); -void load_dr4(u_int64_t dr4); -u_int64_t rdr5(void); -void load_dr5(u_int64_t dr5); -u_int64_t rdr6(void); -void load_dr6(u_int64_t dr6); -u_int64_t rdr7(void); -void load_dr7(u_int64_t dr7); -register_t intr_disable(void); -void intr_restore(register_t rf); #endif /* __GNUC__ */ void reset_dbregs(void); -__END_DECLS - #endif /* !_MACHINE_CPUFUNC_H_ */ ==== //depot/projects/netperf_socket/sys/boot/efi/libefi/efi_console.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/efi_console.c,v 1.4 2003/04/03 21:36:29 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/efi_console.c,v 1.5 2004/03/09 04:00:33 marcel Exp $"); #include #include @@ -46,6 +46,7 @@ static int efi_cons_init(int arg) { + conout->SetAttribute(conout, EFI_TEXT_ATTR(EFI_LIGHTGRAY, EFI_BLACK)); return 0; } ==== //depot/projects/netperf_socket/sys/conf/NOTES#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1203 2004/03/01 07:51:51 bde Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1205 2004/03/08 22:03:28 mlaier Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -409,6 +409,7 @@ # corresponding man page, e.g., ng_async(8). options NETGRAPH #netgraph(4) system options NETGRAPH_ASYNC +options NETGRAPH_ATMLLC options NETGRAPH_BPF options NETGRAPH_BRIDGE options NETGRAPH_CISCO @@ -486,6 +487,13 @@ # The `ef' device provides support for multiple ethernet frame types # specified via ETHER_* options. See ef(4) for details. # +# The pf packet filter consists of three devices: +# The `pf' device provides /dev/pf and the firewall code itself. +# The `pflog' device provides the pflog0 interface which logs packets. +# The `pfsync' device provides the pfsync0 interface used for +# synchronization of firewall state tables (over the net). +# Requires option PFIL_HOOKS and (when used as a module) option RANDOM_IP_ID +# # The PPP_BSDCOMP option enables support for compress(1) style entire # packet compression, the PPP_DEFLATE is for zlib/gzip style compression. # PPP_FILTER enables code for filtering the ppp data stream and selecting @@ -506,6 +514,9 @@ device tun #Tunnel driver (ppp(8), nos-tun(8)) device sl #Serial Line IP device gre #IP over IP tunneling +device pf #PF OpenBSD packet-filter firewall +device pflog #logging support interface for PF +device pfsync #synchronization interface for PF device ppp #Point-to-point protocol options PPP_BSDCOMP #PPP BSD-compress support options PPP_DEFLATE #PPP zlib/deflate/gzip support @@ -560,7 +571,7 @@ # # PFIL_HOOKS enables an abtraction layer which is meant to be used in # network code where filtering is required. See the pfil(9) man page. -# This option is required by the IPFILTER option. +# This option is required by the IPFILTER option and the PF device. # # TCPDEBUG enables code which keeps traces of the TCP state machine # for sockets with the SO_DEBUG option set, which can then be examined ==== //depot/projects/netperf_socket/sys/conf/files#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.872 2004/03/03 09:33:03 obrien Exp $ +# $FreeBSD: src/sys/conf/files,v 1.873 2004/03/08 10:54:35 benno Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1402,6 +1402,7 @@ contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni netgraph/ng_UI.c optional netgraph_UI netgraph/ng_async.c optional netgraph_async +netgraph/ng_atmllc.c optional netgraph_atmllc netgraph/ng_base.c optional netgraph netgraph/ng_bpf.c optional netgraph_bpf net/bpf_filter.c optional netgraph_bpf ==== //depot/projects/netperf_socket/sys/conf/options#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.433 2004/02/28 20:56:35 phk Exp $ +# $FreeBSD: src/sys/conf/options,v 1.434 2004/03/08 10:54:35 benno Exp $ # # On the handling of kernel options # @@ -376,6 +376,7 @@ # option below. Each type has its own man page, e.g. ng_async(4). NETGRAPH NETGRAPH_ASYNC opt_netgraph.h +NETGRAPH_ATMLLC opt_netgraph.h NETGRAPH_BPF opt_netgraph.h NETGRAPH_BRIDGE opt_netgraph.h NETGRAPH_CISCO opt_netgraph.h ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#5 (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/acpica/acpi.c,v 1.123 2004/03/04 04:42:59 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.125 2004/03/09 05:44:47 njl Exp $ */ #include "opt_acpi.h" @@ -1369,7 +1369,7 @@ } ACPI_STATUS -acpi_SetInteger(ACPI_HANDLE handle, char *path, int number) +acpi_SetInteger(ACPI_HANDLE handle, char *path, UINT32 number) { ACPI_OBJECT arg1; ACPI_OBJECT_LIST args; @@ -1388,7 +1388,7 @@ * Evaluate a path that should return an integer. */ ACPI_STATUS -acpi_GetInteger(ACPI_HANDLE handle, char *path, int *number) +acpi_GetInteger(ACPI_HANDLE handle, char *path, UINT32 *number) { ACPI_STATUS status; ACPI_BUFFER buf; @@ -1435,9 +1435,10 @@ } ACPI_STATUS -acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp, int *number) +acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp, UINT32 *number) { ACPI_OBJECT *p; + UINT8 *val; int i; p = (ACPI_OBJECT *)bufp->Pointer; @@ -1451,8 +1452,9 @@ return (AE_BAD_DATA); *number = 0; + val = p->Buffer.Pointer; for (i = 0; i < p->Buffer.Length; i++) - *number += (*(p->Buffer.Pointer + i) << (i * 8)); + *number += val[i] << (i * 8); return (AE_OK); } ==== //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.56 2004/03/03 18:34:42 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.57 2004/03/09 05:41:28 njl Exp $ */ #include "bus_if.h" @@ -176,11 +176,11 @@ ACPI_HANDLE *result); extern ACPI_BUFFER *acpi_AllocBuffer(int size); extern ACPI_STATUS acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp, - int *number); + UINT32 *number); extern ACPI_STATUS acpi_GetInteger(ACPI_HANDLE handle, char *path, - int *number); + UINT32 *number); extern ACPI_STATUS acpi_SetInteger(ACPI_HANDLE handle, char *path, - int number); + UINT32 number); extern ACPI_STATUS acpi_ForeachPackageObject(ACPI_OBJECT *obj, void (*func)(ACPI_OBJECT *comp, void *arg), void *arg); ==== //depot/projects/netperf_socket/sys/dev/if_ndis/if_ndis_pci.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.1 2004/03/07 02:49:06 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.2 2004/03/09 18:39:40 wpaul Exp $"); #include #include @@ -263,6 +263,26 @@ } /* + * If the BIOS did not set up an interrupt for this device, + * the resource traversal code above will fail to set up + * an IRQ resource. This is usually a bad thing, so try to + * force the allocation of an interrupt here. If one was + * not assigned to us by the BIOS, bus_alloc_resource() + * should route one for us. + */ + if (sc->ndis_irq == NULL) { + rid = 0; + sc->ndis_irq = bus_alloc_resource(dev, SYS_RES_IRQ, + &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); + if (sc->ndis_irq == NULL) { + device_printf(dev, "couldn't route interrupt\n"); + error = ENXIO; + goto fail; + } + sc->ndis_rescnt++; + } + + /* * Allocate the parent bus DMA tag appropriate for PCI. */ #define NDIS_NSEG_NEW 32 ==== //depot/projects/netperf_socket/sys/dev/vinum/vinumext.h#2 (text+ko) ==== @@ -34,7 +34,7 @@ * advised of the possibility of such damage. * * $Id: vinumext.h,v 1.33 2003/05/23 00:57:48 grog Exp $ - * $FreeBSD: src/sys/dev/vinum/vinumext.h,v 1.40 2003/05/23 01:13:43 grog Exp $ + * $FreeBSD: src/sys/dev/vinum/vinumext.h,v 1.41 2004/03/09 09:50:15 le Exp $ */ /* vinumext.h: external definitions */ @@ -187,8 +187,6 @@ void update_plex_state(int plexno); void update_volume_state(int volno); void invalidate_subdisks(struct plex *, enum sdstate); -void get_volume_label(char *name, int plexes, u_int64_t size, struct disklabel *lp); -int write_volume_label(int); void start_object(struct vinum_ioctl_msg *); void stop_object(struct vinum_ioctl_msg *); void setstate(struct vinum_ioctl_msg *msg); ==== //depot/projects/netperf_socket/sys/dev/vinum/vinumio.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ * advised of the possibility of such damage. * * $Id: vinumio.c,v 1.39 2003/05/23 00:59:53 grog Exp grog $ - * $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.95 2003/11/24 04:06:56 grog Exp $ + * $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.96 2004/03/09 09:50:15 le Exp $ */ #include @@ -627,66 +627,6 @@ } /* - * Disk labels are a mess. The correct way to - * access them is with the DIOC[GSW]DINFO ioctls, - * but some programs, such as newfs, access the - * disk directly, so we have to write things - * there. We do this only on request. If a user - * request tries to read it directly, we fake up - * one on the fly. - */ - -/* - * get_volume_label returns a label structure to - * lp, which is allocated by the caller. - */ -void -get_volume_label(char *name, int plexes, u_int64_t size, struct disklabel *lp) -{ - bzero(lp, sizeof(struct disklabel)); - - strncpy(lp->d_typename, "vinum", sizeof(lp->d_typename)); - lp->d_type = DTYPE_VINUM; - strncpy(lp->d_packname, name, min(sizeof(lp->d_packname), sizeof(name))); - lp->d_rpm = 14400 * plexes; /* to keep them guessing */ - lp->d_interleave = 1; - lp->d_flags = 0; - - /* - * A Vinum volume has a single track with all - * its sectors. - */ - lp->d_secsize = DEV_BSIZE; /* bytes per sector */ - lp->d_nsectors = size; /* data sectors per track */ - lp->d_ntracks = 1; /* tracks per cylinder */ - lp->d_ncylinders = 1; /* data cylinders per unit */ - lp->d_secpercyl = size; /* data sectors per cylinder */ - lp->d_secperunit = size; /* data sectors per unit */ - - lp->d_bbsize = BBSIZE; - lp->d_sbsize = 0; /* no longer used? */ - lp->d_magic = DISKMAGIC; - lp->d_magic2 = DISKMAGIC; - - /* - * Set up partitions a, b and c to be identical - * and the size of the volume. a is UFS, b is - * swap, c is nothing. - */ - lp->d_partitions[0].p_size = size; - lp->d_partitions[0].p_fsize = 1024; - lp->d_partitions[0].p_fstype = FS_BSDFFS; /* FreeBSD File System :-) */ - lp->d_partitions[0].p_fsize = 1024; /* FS fragment size */ - lp->d_partitions[0].p_frag = 8; /* and fragments per block */ - lp->d_partitions[SWAP_PART].p_size = size; - lp->d_partitions[SWAP_PART].p_fstype = FS_SWAP; /* swap partition */ - lp->d_partitions[LABEL_PART].p_size = size; - lp->d_npartitions = LABEL_PART + 1; - strncpy(lp->d_packname, name, min(sizeof(lp->d_packname), sizeof(name))); - lp->d_checksum = dkcksum(lp); -} - -/* * Search disks on system for vinum slices and add * them to the configuuration if they're not * there already. devicename is a blank-separate ==== //depot/projects/netperf_socket/sys/dev/vinum/vinumrequest.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/vinum/vinumrequest.c,v 1.71 2003/11/24 04:06:56 grog Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/vinum/vinumrequest.c,v 1.72 2004/03/09 12:45:43 le Exp $"); #include #include @@ -1018,7 +1018,7 @@ int vinum_bounds_check(struct buf *bp, struct volume *vol) { - int maxsize = vol->size; /* size of the partition (sectors) */ + int64_t maxsize = vol->size; /* size of the partition (sectors) */ int size = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT; /* size of this request (sectors) */ #ifdef LABELSECTOR ==== //depot/projects/netperf_socket/sys/geom/concat/g_concat.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/concat/g_concat.c,v 1.5 2004/03/04 10:22:42 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/concat/g_concat.c,v 1.6 2004/03/09 11:18:53 pjd Exp $"); #include #include @@ -65,6 +65,32 @@ /* + * Greatest Common Divisor. + */ +static u_int +gcd(u_int a, u_int b) +{ + u_int c; + + while (b != 0) { + c = a; + a = b; + b = (c % b); + } + return (a); +} + +/* + * Least Common Multiple. + */ +static u_int +lcm(u_int a, u_int b) +{ + + return ((a * b) / gcd(a, b)); +} + +/* * Return the number of valid disks. */ static u_int @@ -273,8 +299,8 @@ g_concat_check_and_run(struct g_concat_softc *sc) { struct g_concat_disk *disk; + u_int no, sectorsize = 0; off_t start; - u_int no; if (g_concat_nvalid(sc) != sc->sc_ndisks) return; @@ -288,7 +314,14 @@ if (sc->sc_type == G_CONCAT_TYPE_AUTOMATIC) disk->d_end -= disk->d_consumer->provider->sectorsize; start = disk->d_end; + if (no == 0) + sectorsize = disk->d_consumer->provider->sectorsize; + else { + sectorsize = lcm(sectorsize, + disk->d_consumer->provider->sectorsize); + } } + sc->sc_provider->sectorsize = sectorsize; /* We have sc->sc_disks[sc->sc_ndisks - 1].d_end in 'start'. */ sc->sc_provider->mediasize = start; g_error_provider(sc->sc_provider, 0); @@ -366,6 +399,7 @@ if (sc->sc_type == G_CONCAT_TYPE_AUTOMATIC) { struct g_concat_metadata md; + /* Re-read metadata. */ error = g_concat_read_metadata(cp, &md); if (error != 0) goto fail; @@ -399,7 +433,7 @@ static struct g_geom * g_concat_create(struct g_class *mp, const struct g_concat_metadata *md, - u_int type, size_t sectorsize) + u_int type) { struct g_provider *pp; struct g_concat_softc *sc; @@ -452,10 +486,9 @@ pp = g_new_providerf(gp, "%s", gp->name); sc->sc_provider = pp; - pp->sectorsize = sectorsize; /* * Don't run provider yet (by setting its error to 0), because we're - * not aware of its mediasize. + * not aware of its media and sector size. */ G_CONCAT_DEBUG(0, "Device %s created (id=%u).", gp->name, sc->sc_id); @@ -510,8 +543,8 @@ } static int -g_concat_destroy_geom(struct gctl_req *req, struct g_class *mp, - struct g_geom *gp) +g_concat_destroy_geom(struct gctl_req *req __unused, + struct g_class *mp __unused, struct g_geom *gp) { struct g_concat_softc *sc; @@ -580,8 +613,7 @@ return (NULL); } } else { - gp = g_concat_create(mp, &md, G_CONCAT_TYPE_AUTOMATIC, - pp->sectorsize); + gp = g_concat_create(mp, &md, G_CONCAT_TYPE_AUTOMATIC); if (gp == NULL) { G_CONCAT_DEBUG(0, "Cannot create device %s.concat.", md.md_name); @@ -610,13 +642,12 @@ struct g_concat_softc *sc; struct g_geom *gp; struct sbuf *sb; - uint32_t sectorsize = 0; char buf[20]; g_topology_assert(); md = gctl_get_paraml(req, "metadata", sizeof(*md)); if (md == NULL) { - gctl_error(req, "No 'metadata' argument"); + gctl_error(req, "No '%s' argument.", "metadata"); return; } if (md->md_all <= 1) { @@ -630,17 +661,15 @@ snprintf(buf, sizeof(buf), "disk%u", no); pp = gctl_get_provider(req, buf); if (pp == NULL) { - G_CONCAT_DEBUG(1, "Disk %u is invalid.", no); - gctl_error(req, "Disk %u is invalid", no); + G_CONCAT_DEBUG(1, "Disk %u is invalid.", no + 1); + gctl_error(req, "Disk %u is invalid.", no + 1); return; } - if (no == 0) - sectorsize = pp->sectorsize; } - gp = g_concat_create(mp, md, G_CONCAT_TYPE_MANUAL, sectorsize); + gp = g_concat_create(mp, md, G_CONCAT_TYPE_MANUAL); if (gp == NULL) { - gctl_error(req, "Can't configure %s.concat", md->md_name); + gctl_error(req, "Can't configure %s.concat.", md->md_name); return; } @@ -673,9 +702,10 @@ int *force, error; g_topology_assert(); + force = gctl_get_paraml(req, "force", sizeof(*force)); if (force == NULL) { - gctl_error(req, "No 'force' argument"); + gctl_error(req, "No '%s' argument.", "force"); return; } sc = gp->softc; @@ -713,8 +743,7 @@ g_concat_ctl_destroy(req, gp); return; } - - gctl_error(req, "unknown verb"); + gctl_error(req, "Unknown verb."); } static void ==== //depot/projects/netperf_socket/sys/geom/concat/g_concat.h#5 (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/geom/concat/g_concat.h,v 1.5 2004/03/04 10:22:42 pjd Exp $ + * $FreeBSD: src/sys/geom/concat/g_concat.h,v 1.6 2004/03/09 11:00:24 pjd Exp $ */ #ifndef _G_CONCAT_H_ @@ -51,6 +51,7 @@ if (g_concat_debug >= 2) { \ printf("GEOM_CONCAT[2]: "); \ printf(__VA_ARGS__); \ + printf(" "); \ g_print_bio(bp); \ printf("\n"); \ } \ ==== //depot/projects/netperf_socket/sys/geom/geom_subr.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/geom_subr.c,v 1.71 2004/02/14 17:58:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_subr.c,v 1.72 2004/03/07 17:33:15 phk Exp $"); #include #include @@ -272,7 +272,8 @@ if (!(gp->flags & G_GEOM_WITHER)) { gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, error); + if (!(pp->flags & G_PF_ORPHAN)) + g_orphan_provider(pp, error); } for (pp = LIST_FIRST(&gp->provider); pp != NULL; pp = pp2) { pp2 = LIST_NEXT(pp, provider); ==== //depot/projects/netperf_socket/sys/i386/i386/elan-mmcr.c#4 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.24 2004/02/28 20:06:58 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.25 2004/03/09 02:51:21 jb Exp $"); #include "opt_cpu.h" #include @@ -75,6 +75,7 @@ u_int pps_a, pps_d; u_int echo_a, echo_d; #endif /* CPU_ELAN_PPS */ +#ifdef CPU_SOEKRIS u_int led_cookie[32]; dev_t led_dev[32]; @@ -90,6 +91,7 @@ v ^= 0xc; mmcrptr[v / 2] = u; } +#endif static int sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS) @@ -97,7 +99,10 @@ u_int u, v; int i, np, ne; int error; - char buf[32], tmp[10]; + char buf[32]; +#ifdef CPU_SOEKRIS + char tmp[10]; +#endif error = SYSCTL_OUT(req, gpio_config, 33); if (error != 0 || req->newptr == NULL) @@ -141,11 +146,13 @@ v = 2; else >>> TRUNCATED FOR MAIL (1000 lines) <<<