From owner-svn-src-projects@FreeBSD.ORG Wed Jul 28 13:43:02 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED3F61065672; Wed, 28 Jul 2010 13:43:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D90DF8FC20; Wed, 28 Jul 2010 13:43:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SDh2rS032608; Wed, 28 Jul 2010 13:43:02 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SDh2QD032569; Wed, 28 Jul 2010 13:43:02 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007281343.o6SDh2QD032569@svn.freebsd.org> From: Attilio Rao Date: Wed, 28 Jul 2010 13:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210560 - in projects/sv: . bin/setfacl contrib/top lib/libc/sys lib/libelf sbin/geom/class/part sbin/ipfw share/mk sys/amd64/include sys/amd64/linux32 sys/arm/include sys/compat/freebs... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 13:43:03 -0000 Author: attilio Date: Wed Jul 28 13:43:02 2010 New Revision: 210560 URL: http://svn.freebsd.org/changeset/base/210560 Log: MFC Added: projects/sv/sys/x86/acpica/ - copied from r210559, head/sys/x86/acpica/ Modified: projects/sv/ObsoleteFiles.inc projects/sv/bin/setfacl/setfacl.1 projects/sv/lib/libc/sys/mlock.2 projects/sv/lib/libc/sys/mlockall.2 projects/sv/lib/libelf/libelf_convert.m4 projects/sv/sbin/geom/class/part/gpart.8 projects/sv/sbin/ipfw/ipfw.8 projects/sv/sys/amd64/include/vmparam.h projects/sv/sys/amd64/linux32/linux32_sysvec.c projects/sv/sys/arm/include/vmparam.h projects/sv/sys/compat/freebsd32/freebsd32_misc.c projects/sv/sys/conf/files.amd64 projects/sv/sys/conf/files.i386 projects/sv/sys/dev/usb/quirk/usb_quirk.c projects/sv/sys/dev/usb/serial/u3g.c projects/sv/sys/dev/usb/serial/uftdi.c projects/sv/sys/dev/usb/usbdevs projects/sv/sys/i386/include/vmparam.h projects/sv/sys/i386/linux/linux_sysvec.c projects/sv/sys/ia64/include/vmparam.h projects/sv/sys/kern/imgact_shell.c projects/sv/sys/kern/kern_exec.c projects/sv/sys/mips/include/vmparam.h projects/sv/sys/mips/rmi/files.xlr projects/sv/sys/mips/rmi/tick.c projects/sv/sys/net/if.c projects/sv/sys/net/if_llatbl.c projects/sv/sys/netgraph/ng_ipfw.c projects/sv/sys/netinet/ipfw/ip_fw2.c projects/sv/sys/powerpc/include/vmparam.h projects/sv/sys/sparc64/include/vmparam.h projects/sv/sys/sun4v/include/vmparam.h projects/sv/sys/sys/imgact.h projects/sv/sys/sys/pcpu.h projects/sv/sys/vm/vm_init.c projects/sv/sys/vm/vm_mmap.c projects/sv/sys/vm/vm_phys.c projects/sv/sys/vm/vm_phys.h Directory Properties: projects/sv/ (props changed) projects/sv/cddl/contrib/opensolaris/ (props changed) projects/sv/contrib/bind9/ (props changed) projects/sv/contrib/ee/ (props changed) projects/sv/contrib/expat/ (props changed) projects/sv/contrib/file/ (props changed) projects/sv/contrib/gdb/ (props changed) projects/sv/contrib/gdtoa/ (props changed) projects/sv/contrib/gnu-sort/ (props changed) projects/sv/contrib/groff/ (props changed) projects/sv/contrib/less/ (props changed) projects/sv/contrib/libpcap/ (props changed) projects/sv/contrib/llvm/ (props changed) projects/sv/contrib/llvm/tools/clang/ (props changed) projects/sv/contrib/ncurses/ (props changed) projects/sv/contrib/netcat/ (props changed) projects/sv/contrib/ntp/ (props changed) projects/sv/contrib/one-true-awk/ (props changed) projects/sv/contrib/openbsm/ (props changed) projects/sv/contrib/openpam/ (props changed) projects/sv/contrib/pf/ (props changed) projects/sv/contrib/sendmail/ (props changed) projects/sv/contrib/tcpdump/ (props changed) projects/sv/contrib/tcsh/ (props changed) projects/sv/contrib/top/ (props changed) projects/sv/contrib/top/install-sh (props changed) projects/sv/contrib/tzcode/stdtime/ (props changed) projects/sv/contrib/tzcode/zic/ (props changed) projects/sv/contrib/tzdata/ (props changed) projects/sv/contrib/wpa/ (props changed) projects/sv/crypto/openssh/ (props changed) projects/sv/crypto/openssl/ (props changed) projects/sv/lib/libc/ (props changed) projects/sv/lib/libc/stdtime/ (props changed) projects/sv/lib/libutil/ (props changed) projects/sv/lib/libz/ (props changed) projects/sv/sbin/ (props changed) projects/sv/sbin/ipfw/ (props changed) projects/sv/share/mk/bsd.arch.inc.mk (props changed) projects/sv/share/zoneinfo/ (props changed) projects/sv/sys/ (props changed) projects/sv/sys/amd64/include/xen/ (props changed) projects/sv/sys/cddl/contrib/opensolaris/ (props changed) projects/sv/sys/contrib/dev/acpica/ (props changed) projects/sv/sys/contrib/pf/ (props changed) projects/sv/sys/contrib/x86emu/ (props changed) projects/sv/sys/dev/xen/xenpci/ (props changed) projects/sv/usr.bin/csup/ (props changed) projects/sv/usr.bin/procstat/ (props changed) projects/sv/usr.sbin/zic/ (props changed) Modified: projects/sv/ObsoleteFiles.inc ============================================================================== --- projects/sv/ObsoleteFiles.inc Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/ObsoleteFiles.inc Wed Jul 28 13:43:02 2010 (r210560) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100725: acpi_aiboost(4) removal. +OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz # 20100720: new clang import which bumps version from 2.0 to 2.8 OLD_FILES+=usr/include/clang/2.0/emmintrin.h OLD_FILES+=usr/include/clang/2.0/mm_malloc.h Modified: projects/sv/bin/setfacl/setfacl.1 ============================================================================== --- projects/sv/bin/setfacl/setfacl.1 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/bin/setfacl/setfacl.1 Wed Jul 28 13:43:02 2010 (r210560) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2010 +.Dd July 27, 2010 .Dt SETFACL 1 .Os .Sh NAME @@ -299,7 +299,7 @@ one of .Dq Li group@ , or .Dq Li everyone@ , -this field is ommited altogether, including the trailing comma. +this field is omitted altogether, including the trailing comma. .It Ar "access permissions" Access permissions may be specified in either short or long form. Short and long forms may not be mixed. Modified: projects/sv/lib/libc/sys/mlock.2 ============================================================================== --- projects/sv/lib/libc/sys/mlock.2 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/lib/libc/sys/mlock.2 Wed Jul 28 13:43:02 2010 (r210560) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd August 10, 2004 +.Dd July 27, 2010 .Dt MLOCK 2 .Os .Sh NAME @@ -116,11 +116,12 @@ The caller is not the super-user. .It Bq Er EINVAL The address given is not page aligned or the length is negative. .It Bq Er EAGAIN -Locking the indicated range would exceed either the system or per-process -limit for locked memory. +Locking the indicated range would exceed the system limit for locked memory. .It Bq Er ENOMEM Some portion of the indicated address range is not allocated. There was an error faulting/mapping a page. +Locking the indicated range would exceed the per-process limit for locked +memory. .El The .Fn munlock Modified: projects/sv/lib/libc/sys/mlockall.2 ============================================================================== --- projects/sv/lib/libc/sys/mlockall.2 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/lib/libc/sys/mlockall.2 Wed Jul 28 13:43:02 2010 (r210560) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 1999 +.Dd July 27, 2010 .Dt MLOCKALL 2 .Os .Sh NAME @@ -72,6 +72,8 @@ limit and the per-process .Dv RLIMIT_MEMLOCK resource limit. .Pp +These calls are only available to the super-user. +.Pp The .Fn munlockall call unlocks any locked memory regions in the process address space. Modified: projects/sv/lib/libelf/libelf_convert.m4 ============================================================================== --- projects/sv/lib/libelf/libelf_convert.m4 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/lib/libelf/libelf_convert.m4 Wed Jul 28 13:43:02 2010 (r210560) @@ -507,6 +507,7 @@ libelf_cvt_BYTE_tox(char *dst, size_t ds MAKE_TYPE_CONVERTERS(ELF_TYPE_LIST) +#if __FreeBSD_version >= 800062 /* * Sections of type ELF_T_GNUHASH start with a header containing 4 32-bit * words. Bloom filter data comes next, followed by hash buckets and the @@ -700,6 +701,7 @@ libelf_cvt64_GNUHASH_tof(char *dst, size return (1); } +#endif /* * Elf_Note structures comprise a fixed size header followed by variable @@ -873,12 +875,14 @@ CONVERTER_NAMES(ELF_TYPE_LIST) .tom64 = libelf_cvt_BYTE_tox }, +#if __FreeBSD_version >= 800062 [ELF_T_GNUHASH] = { .tof32 = libelf_cvt32_GNUHASH_tof, .tom32 = libelf_cvt32_GNUHASH_tom, .tof64 = libelf_cvt64_GNUHASH_tof, .tom64 = libelf_cvt64_GNUHASH_tom }, +#endif [ELF_T_NOTE] = { .tof32 = libelf_cvt_NOTE_tof, Modified: projects/sv/sbin/geom/class/part/gpart.8 ============================================================================== --- projects/sv/sbin/geom/class/part/gpart.8 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sbin/geom/class/part/gpart.8 Wed Jul 28 13:43:02 2010 (r210560) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2010 +.Dd July 27, 2010 .Dt GPART 8 .Os .Sh NAME @@ -363,7 +363,7 @@ numbers and can be given by the option. If .Fl s -option is ommited then new size is automatically calculated +option is omitted then new size is automatically calculated to maximum available from given geom .Ar geom . .Pp Modified: projects/sv/sbin/ipfw/ipfw.8 ============================================================================== --- projects/sv/sbin/ipfw/ipfw.8 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sbin/ipfw/ipfw.8 Wed Jul 28 13:43:02 2010 (r210560) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2010 +.Dd July 27, 2010 .Dt IPFW 8 .Os .Sh NAME @@ -859,9 +859,7 @@ accepted or continues with the next rule sysctl variable. .It Cm ngtee Ar cookie A copy of packet is diverted into netgraph, original -packet is either accepted or continues with the next rule, depending on -.Va net.inet.ip.fw.one_pass -sysctl variable. +packet continues with the next rule. See .Xr ng_ipfw 4 for more information on Modified: projects/sv/sys/amd64/include/vmparam.h ============================================================================== --- projects/sv/sys/amd64/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/amd64/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -132,6 +132,13 @@ #define VM_NFREEORDER 13 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Enable superpage reservations: 1 level. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- projects/sv/sys/amd64/linux32/linux32_sysvec.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/amd64/linux32/linux32_sysvec.c Wed Jul 28 13:43:02 2010 (r210560) @@ -804,7 +804,7 @@ exec_linux_imgact_try(struct image_param { const char *head = (const char *)imgp->image_header; char *rpath; - int error = -1, len; + int error = -1; /* * The interpreter for shell scripts run from a linux binary needs @@ -821,18 +821,12 @@ exec_linux_imgact_try(struct image_param linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD); - if (rpath != NULL) { - len = strlen(rpath) + 1; - - if (len <= MAXSHELLCMDLEN) { - memcpy(imgp->interpreter_name, rpath, - len); - } - free(rpath, M_TEMP); - } + if (rpath != NULL) + imgp->args->fname_buf = + imgp->interpreter_name = rpath; } } - return(error); + return (error); } /* Modified: projects/sv/sys/arm/include/vmparam.h ============================================================================== --- projects/sv/sys/arm/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/arm/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -86,6 +86,13 @@ #define VM_NFREEORDER 9 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- projects/sv/sys/compat/freebsd32/freebsd32_misc.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/compat/freebsd32/freebsd32_misc.c Wed Jul 28 13:43:02 2010 (r210560) @@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$"); #endif #include -#include #include #include #include @@ -279,19 +278,18 @@ freebsd32_exec_copyin_args(struct image_ return (EFAULT); /* - * Allocate temporary demand zeroed space for argument and - * environment strings + * Allocate demand-paged memory for the file name, argument, and + * environment strings. */ - args->buf = (char *) kmem_alloc_wait(exec_map, - PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); - if (args->buf == NULL) - return (ENOMEM); + error = exec_alloc_args(args); + if (error != 0) + return (error); /* * Copy the file name. */ if (fname != NULL) { - args->fname = args->buf + MAXSHELLCMDLEN; + args->fname = args->buf; error = (segflg == UIO_SYSSPACE) ? copystr(fname, args->fname, PATH_MAX, &length) : copyinstr(fname, args->fname, PATH_MAX, &length); @@ -300,7 +298,7 @@ freebsd32_exec_copyin_args(struct image_ } else length = 0; - args->begin_argv = args->buf + MAXSHELLCMDLEN + length; + args->begin_argv = args->buf + length; args->endp = args->begin_argv; args->stringspace = ARG_MAX; Modified: projects/sv/sys/conf/files.amd64 ============================================================================== --- projects/sv/sys/conf/files.amd64 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/conf/files.amd64 Wed Jul 28 13:43:02 2010 (r210560) @@ -302,6 +302,7 @@ contrib/x86emu/x86emu.c optional x86bio # # x86 shared code between IA32, AMD64 and PC98 architectures # +x86/acpica/srat.c optional acpi x86/bios/smbios.c optional smbios x86/bios/vpd.c optional vpd x86/cpufreq/powernow.c optional cpufreq @@ -320,4 +321,3 @@ x86/x86/io_apic.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard x86/x86/msi.c optional pci - Modified: projects/sv/sys/conf/files.i386 ============================================================================== --- projects/sv/sys/conf/files.i386 Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/conf/files.i386 Wed Jul 28 13:43:02 2010 (r210560) @@ -376,6 +376,7 @@ contrib/x86emu/x86emu.c optional x86bio # # x86 shared code between IA32, AMD64 and PC98 architectures # +x86/acpica/srat.c optional acpi x86/bios/smbios.c optional smbios x86/bios/vpd.c optional vpd x86/cpufreq/est.c optional cpufreq Modified: projects/sv/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- projects/sv/sys/dev/usb/quirk/usb_quirk.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/dev/usb/quirk/usb_quirk.c Wed Jul 28 13:43:02 2010 (r210560) @@ -115,6 +115,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE), Modified: projects/sv/sys/dev/usb/serial/u3g.c ============================================================================== --- projects/sv/sys/dev/usb/serial/u3g.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/dev/usb/serial/u3g.c Wed Jul 28 13:43:02 2010 (r210560) @@ -285,6 +285,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), + U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), U3G_DEV(MERLIN, V620, 0), U3G_DEV(NOVATEL, E725, 0), U3G_DEV(NOVATEL, ES620, 0), Modified: projects/sv/sys/dev/usb/serial/uftdi.c ============================================================================== --- projects/sv/sys/dev/usb/serial/uftdi.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/dev/usb/serial/uftdi.c Wed Jul 28 13:43:02 2010 (r210560) @@ -226,6 +226,7 @@ static struct usb_device_id uftdi_devs[] UFTDI_DEV(FTDI, CFA_634, 8U232AM), UFTDI_DEV(FTDI, CFA_635, 8U232AM), UFTDI_DEV(FTDI, USBSERIAL, 8U232AM), + UFTDI_DEV(FTDI, KBS, 8U232AM), UFTDI_DEV(FTDI, MX2_3, 8U232AM), UFTDI_DEV(FTDI, MX4_5, 8U232AM), UFTDI_DEV(FTDI, LK202, 8U232AM), Modified: projects/sv/sys/dev/usb/usbdevs ============================================================================== --- projects/sv/sys/dev/usb/usbdevs Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/dev/usb/usbdevs Wed Jul 28 13:43:02 2010 (r210560) @@ -346,6 +346,7 @@ vendor ASIAMD 0x06be Asia Microelectron vendor BIZLINK 0x06c4 Bizlink International vendor KEYSPAN 0x06cd Keyspan / InnoSys Inc. vendor AASHIMA 0x06d6 Aashima Technology +vendor LIEBERT 0x06da Liebert vendor MULTITECH 0x06e0 MultiTech vendor ADS 0x06e1 ADS Technologies vendor ALCATELM 0x06e4 Alcatel Microelectronics @@ -645,6 +646,7 @@ vendor STELERA 0x1a8d Stelera Wireless vendor OVISLINK 0x1b75 OvisLink vendor TCTMOBILE 0x1bbb TCT Mobile vendor TELIT 0x1bc7 Telit +vendor LONGCHEER 0x1c9e Longcheer Holdings, Ltd. vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik vendor PEGATRON 0x1d4d Pegatron @@ -1517,6 +1519,7 @@ product FTDI TACTRIX_OPENPORT_13M 0xcc48 product FTDI TACTRIX_OPENPORT_13S 0xcc49 OpenPort 1.3 Subaru product FTDI TACTRIX_OPENPORT_13U 0xcc4a OpenPort 1.3 Universal product FTDI GAMMASCOUT 0xd678 Gamma-Scout +product FTDI KBS 0xe6c8 Pyramid KBS USB LCD product FTDI EISCOU 0xe888 Expert ISDN Control USB product FTDI UOPTBR 0xe889 USB-RS232 OptoBridge product FTDI EMCU2D 0xe88a Expert mouseCLOCK USB II @@ -1933,6 +1936,9 @@ product LEXAR CF_READER 0xb002 USB CF R /* Lexmark products */ product LEXMARK S2450 0x0009 Optra S 2450 +/* Liebert products */ +product LIEBERT POWERSURE_PXT 0xffff PowerSure Personal XT + /* Linksys products */ product LINKSYS MAUSB2 0x0105 Camedia MAUSB-2 product LINKSYS USB10TX1 0x200c USB10TX @@ -1984,6 +1990,9 @@ product LOGITEC RT2870_1 0x0162 RT2870 product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 +/* Longcheer Holdings, Ltd. products */ +product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA USB modem + /* Lucent products */ product LUCENT EVALKIT 0x1001 USS-720 evaluation kit @@ -2315,7 +2324,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 -product OPTION_ICON452 0x7901 Globetrotter iCON 452 +product OPTION ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 Modified: projects/sv/sys/i386/include/vmparam.h ============================================================================== --- projects/sv/sys/i386/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/i386/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -119,6 +119,13 @@ #endif /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Enable superpage reservations: 1 level. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/i386/linux/linux_sysvec.c ============================================================================== --- projects/sv/sys/i386/linux/linux_sysvec.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/i386/linux/linux_sysvec.c Wed Jul 28 13:43:02 2010 (r210560) @@ -904,7 +904,7 @@ exec_linux_imgact_try(struct image_param { const char *head = (const char *)imgp->image_header; char *rpath; - int error = -1, len; + int error = -1; /* * The interpreter for shell scripts run from a linux binary needs @@ -920,17 +920,12 @@ exec_linux_imgact_try(struct image_param if ((error = exec_shell_imgact(imgp)) == 0) { linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD); - if (rpath != NULL) { - len = strlen(rpath) + 1; - - if (len <= MAXSHELLCMDLEN) { - memcpy(imgp->interpreter_name, rpath, len); - } - free(rpath, M_TEMP); - } + if (rpath != NULL) + imgp->args->fname_buf = + imgp->interpreter_name = rpath; } } - return(error); + return (error); } /* Modified: projects/sv/sys/ia64/include/vmparam.h ============================================================================== --- projects/sv/sys/ia64/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/ia64/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -120,6 +120,13 @@ #define VM_NFREEORDER 16 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/kern/imgact_shell.c ============================================================================== --- projects/sv/sys/kern/imgact_shell.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/kern/imgact_shell.c Wed Jul 28 13:43:02 2010 (r210560) @@ -240,8 +240,7 @@ exec_shell_imgact(imgp) imgp->args->stringspace, NULL); if (error == 0) - error = copystr(imgp->args->begin_argv, imgp->interpreter_name, - MAXSHELLCMDLEN, NULL); + imgp->interpreter_name = imgp->args->begin_argv; if (sname != NULL) sbuf_delete(sname); Modified: projects/sv/sys/kern/kern_exec.c ============================================================================== --- projects/sv/sys/kern/kern_exec.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/kern/kern_exec.c Wed Jul 28 13:43:02 2010 (r210560) @@ -375,7 +375,7 @@ do_execve(td, args, mac_p) imgp->vmspace_destroyed = 0; imgp->interpreted = 0; imgp->opened = 0; - imgp->interpreter_name = args->buf; + imgp->interpreter_name = NULL; imgp->auxargs = NULL; imgp->vp = NULL; imgp->object = NULL; @@ -1078,23 +1078,20 @@ exec_copyin_args(struct image_args *args bzero(args, sizeof(*args)); if (argv == NULL) return (EFAULT); + /* - * Allocate temporary demand zeroed space for argument and - * environment strings: - * - * o ARG_MAX for argument and environment; - * o MAXSHELLCMDLEN for the name of interpreters. + * Allocate demand-paged memory for the file name, argument, and + * environment strings. */ - args->buf = (char *) kmem_alloc_wait(exec_map, - PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); - if (args->buf == NULL) - return (ENOMEM); + error = exec_alloc_args(args); + if (error != 0) + return (error); /* * Copy the file name. */ if (fname != NULL) { - args->fname = args->buf + MAXSHELLCMDLEN; + args->fname = args->buf; error = (segflg == UIO_SYSSPACE) ? copystr(fname, args->fname, PATH_MAX, &length) : copyinstr(fname, args->fname, PATH_MAX, &length); @@ -1103,7 +1100,7 @@ exec_copyin_args(struct image_args *args } else length = 0; - args->begin_argv = args->buf + MAXSHELLCMDLEN + length; + args->begin_argv = args->buf + length; args->endp = args->begin_argv; args->stringspace = ARG_MAX; @@ -1156,15 +1153,32 @@ err_exit: return (error); } +/* + * Allocate temporary demand-paged, zero-filled memory for the file name, + * argument, and environment strings. Returns zero if the allocation succeeds + * and ENOMEM otherwise. + */ +int +exec_alloc_args(struct image_args *args) +{ + + args->buf = (char *)kmem_alloc_wait(exec_map, PATH_MAX + ARG_MAX); + return (args->buf != NULL ? 0 : ENOMEM); +} + void exec_free_args(struct image_args *args) { if (args->buf != NULL) { kmem_free_wakeup(exec_map, (vm_offset_t)args->buf, - PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); + PATH_MAX + ARG_MAX); args->buf = NULL; } + if (args->fname_buf != NULL) { + free(args->fname_buf, M_TEMP); + args->fname_buf = NULL; + } } /* Modified: projects/sv/sys/mips/include/vmparam.h ============================================================================== --- projects/sv/sys/mips/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/mips/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -118,6 +118,13 @@ #endif /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. (not sure if this is right * I copied it from ARM) */ Modified: projects/sv/sys/mips/rmi/files.xlr ============================================================================== --- projects/sv/sys/mips/rmi/files.xlr Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/mips/rmi/files.xlr Wed Jul 28 13:43:02 2010 (r210560) @@ -18,7 +18,7 @@ mips/rmi/perfmon_percpu.c optional xlr mips/rmi/xlr_pci.c optional pci mips/rmi/xls_ehci.c optional usb ehci mips/rmi/bus_space_rmi.c standard -mips/rmi/bus_space_rmi_pci.c optional pci +mips/rmi/bus_space_rmi_pci.c standard mips/rmi/dev/sec/rmisec.c optional rmisec mips/rmi/dev/sec/rmilib.c optional rmisec mips/rmi/dev/xlr/rge.c optional rge Modified: projects/sv/sys/mips/rmi/tick.c ============================================================================== --- projects/sv/sys/mips/rmi/tick.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/mips/rmi/tick.c Wed Jul 28 13:43:02 2010 (r210560) @@ -62,9 +62,8 @@ struct timecounter *platform_timecounter static DPCPU_DEFINE(uint32_t, cycles_per_tick); static uint32_t cycles_per_usec; -static u_int32_t counter_upper = 0; -static u_int32_t counter_lower_last = 0; - +static DPCPU_DEFINE(uint32_t, counter_upper); +static DPCPU_DEFINE(uint32_t, counter_lower_last); static DPCPU_DEFINE(uint32_t, compare_ticks); static DPCPU_DEFINE(uint32_t, lost_ticks); @@ -106,6 +105,7 @@ tick_ticker(void) { uint64_t ret; uint32_t ticktock; + uint32_t t_lower_last, t_upper; /* * XXX: MIPS64 platforms can read 64-bits of counter directly. @@ -115,12 +115,16 @@ tick_ticker(void) */ ticktock = mips_rd_count(); critical_enter(); - if (ticktock < counter_lower_last) - counter_upper++; - counter_lower_last = ticktock; + t_lower_last = DPCPU_GET(counter_lower_last); + t_upper = DPCPU_GET(counter_upper); + if (ticktock < t_lower_last) + t_upper++; + t_lower_last = ticktock; + DPCPU_SET(counter_upper, t_upper); + DPCPU_SET(counter_lower_last, t_lower_last); critical_exit(); - ret = ((uint64_t) counter_upper << 32) | counter_lower_last; + ret = ((uint64_t)t_upper << 32) | t_lower_last; return (ret); } @@ -265,9 +269,9 @@ clock_intr(void *arg) mips_wr_compare(0xffffffff); critical_enter(); - if (count < counter_lower_last) { - counter_upper++; - counter_lower_last = count; + if (count < DPCPU_GET(counter_lower_last)) { + DPCPU_SET(counter_upper, DPCPU_GET(counter_upper) + 1); + DPCPU_SET(counter_lower_last, count); } if (cycles_per_tick > 0) { Modified: projects/sv/sys/net/if.c ============================================================================== --- projects/sv/sys/net/if.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/net/if.c Wed Jul 28 13:43:02 2010 (r210560) @@ -1728,7 +1728,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, u_int af = addr->sa_family; if (af >= AF_MAX) - return (0); + return (NULL); IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != af) Modified: projects/sv/sys/net/if_llatbl.c ============================================================================== --- projects/sv/sys/net/if_llatbl.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/net/if_llatbl.c Wed Jul 28 13:43:02 2010 (r210560) @@ -234,8 +234,6 @@ lltable_init(struct ifnet *ifp, int af) register int i; llt = malloc(sizeof(struct lltable), M_LLTABLE, M_WAITOK); - if (llt == NULL) - return (NULL); llt->llt_af = af; llt->llt_ifp = ifp; Modified: projects/sv/sys/netgraph/ng_ipfw.c ============================================================================== --- projects/sv/sys/netgraph/ng_ipfw.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/netgraph/ng_ipfw.c Wed Jul 28 13:43:02 2010 (r210560) @@ -287,7 +287,8 @@ ng_ipfw_input(struct mbuf **m0, int dir, } r = (struct ipfw_rule_ref *)(tag + 1); *r = fwa->rule; - r->info = dir ? IPFW_INFO_IN : IPFW_INFO_OUT; + r->info &= IPFW_ONEPASS; /* keep this info */ + r->info |= dir ? IPFW_INFO_IN : IPFW_INFO_OUT; m_tag_prepend(m, tag); } else Modified: projects/sv/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- projects/sv/sys/netinet/ipfw/ip_fw2.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/netinet/ipfw/ip_fw2.c Wed Jul 28 13:43:02 2010 (r210560) @@ -2084,6 +2084,8 @@ do { \ set_match(args, f_pos, chain); args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; + if (V_fw_one_pass) + args->rule.info |= IPFW_ONEPASS; retval = (cmd->opcode == O_NETGRAPH) ? IP_FW_NETGRAPH : IP_FW_NGTEE; l = 0; /* exit inner loop */ Modified: projects/sv/sys/powerpc/include/vmparam.h ============================================================================== --- projects/sv/sys/powerpc/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/powerpc/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -167,6 +167,13 @@ struct pmap_physseg { #define VM_NFREEORDER 11 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/sparc64/include/vmparam.h ============================================================================== --- projects/sv/sys/sparc64/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/sparc64/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -121,6 +121,13 @@ #define VM_NFREEORDER 12 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/sun4v/include/vmparam.h ============================================================================== --- projects/sv/sys/sun4v/include/vmparam.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/sun4v/include/vmparam.h Wed Jul 28 13:43:02 2010 (r210560) @@ -121,6 +121,13 @@ #define VM_NFREEORDER 12 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: projects/sv/sys/sys/imgact.h ============================================================================== --- projects/sv/sys/sys/imgact.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/sys/imgact.h Wed Jul 28 13:43:02 2010 (r210560) @@ -42,6 +42,7 @@ struct image_args { char *begin_envv; /* beginning of envv in buf */ char *endp; /* current `end' pointer of arg & env strings */ char *fname; /* pointer to filename of executable (system space) */ + char *fname_buf; /* pointer to optional malloc(M_TEMP) buffer */ int stringspace; /* space left in arg & env buffer */ int argc; /* count of argument strings */ int envc; /* count of environment strings */ @@ -78,6 +79,7 @@ struct thread; #define IMGACT_CORE_COMPRESS 0x01 +int exec_alloc_args(struct image_args *); int exec_check_permissions(struct image_params *); register_t *exec_copyout_strings(struct image_params *); void exec_free_args(struct image_args *); Modified: projects/sv/sys/sys/pcpu.h ============================================================================== --- projects/sv/sys/sys/pcpu.h Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/sys/pcpu.h Wed Jul 28 13:43:02 2010 (r210560) @@ -179,6 +179,7 @@ struct pcpu { struct device *pc_device; void *pc_netisr; /* netisr SWI cookie */ int pc_dnweight; /* vm_page_dontneed() */ + int pc_domain; /* Memory domain. */ /* * Stuff for read mostly lock Modified: projects/sv/sys/vm/vm_init.c ============================================================================== --- projects/sv/sys/vm/vm_init.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/vm/vm_init.c Wed Jul 28 13:43:02 2010 (r210560) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -195,8 +194,7 @@ again: (long)nswbuf * MAXPHYS, FALSE); pager_map->system_map = 1; exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - exec_map_entries * round_page(PATH_MAX + ARG_MAX + MAXSHELLCMDLEN), - FALSE); + exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE); pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, FALSE); Modified: projects/sv/sys/vm/vm_mmap.c ============================================================================== --- projects/sv/sys/vm/vm_mmap.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/vm/vm_mmap.c Wed Jul 28 13:43:02 2010 (r210560) @@ -1082,8 +1082,7 @@ mlockall(td, uap) * a hard resource limit, return ENOMEM. */ PROC_LOCK(td->td_proc); - if (map->size - ptoa(pmap_wired_count(vm_map_pmap(map)) > - lim_cur(td->td_proc, RLIMIT_MEMLOCK))) { + if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(td->td_proc); return (ENOMEM); } Modified: projects/sv/sys/vm/vm_phys.c ============================================================================== --- projects/sv/sys/vm/vm_phys.c Wed Jul 28 11:01:07 2010 (r210559) +++ projects/sv/sys/vm/vm_phys.c Wed Jul 28 13:43:02 2010 (r210560) @@ -56,6 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * VM_FREELIST_DEFAULT is split into VM_NDOMAIN lists, one for each + * domain. These extra lists are stored at the end of the regular + * free lists starting with VM_NFREELIST. + */ +#define VM_RAW_NFREELIST (VM_NFREELIST + VM_NDOMAIN - 1) + struct vm_freelist { struct pglist pl; int lcnt; @@ -65,15 +72,20 @@ struct vm_phys_seg { vm_paddr_t start; vm_paddr_t end; vm_page_t first_page; + int domain; struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER]; }; +struct mem_affinity *mem_affinity; + static struct vm_phys_seg vm_phys_segs[VM_PHYSSEG_MAX]; static int vm_phys_nsegs; static struct vm_freelist - vm_phys_free_queues[VM_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; + vm_phys_free_queues[VM_RAW_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; +static struct vm_freelist +(*vm_phys_lookup_lists[VM_NDOMAIN][VM_RAW_NFREELIST])[VM_NFREEPOOL][VM_NFREEORDER]; static int vm_nfreelists = VM_FREELIST_DEFAULT + 1; @@ -89,6 +101,14 @@ static int sysctl_vm_phys_segs(SYSCTL_HA SYSCTL_OID(_vm, OID_AUTO, phys_segs, CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, sysctl_vm_phys_segs, "A", "Phys Seg Info"); +#if VM_NDOMAIN > 1 +static int sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS); +SYSCTL_OID(_vm, OID_AUTO, phys_lookup_lists, CTLTYPE_STRING | CTLFLAG_RD, + NULL, 0, sysctl_vm_phys_lookup_lists, "A", "Phys Lookup Lists"); +#endif + +static void _vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind, + int domain); static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind); static int vm_phys_paddr_to_segind(vm_paddr_t pa); static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, @@ -157,6 +177,7 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) (uintmax_t)seg->start); sbuf_printf(&sbuf, "end: %#jx\n", (uintmax_t)seg->end); + sbuf_printf(&sbuf, "domain: %d\n", seg->domain); sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues); } sbuf_finish(&sbuf); @@ -166,11 +187,40 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) return (error); } +#if VM_NDOMAIN > 1 +/* + * Outputs the set of free list lookup lists. + */ +static int +sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS) +{ + struct sbuf sbuf; + char *cbuf; + const int cbufsize = (vm_nfreelists + 1) * VM_NDOMAIN * 81; + int domain, error, flind, ndomains; + + ndomains = vm_nfreelists - VM_NFREELIST + 1; + cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); + for (domain = 0; domain < ndomains; domain++) { + sbuf_printf(&sbuf, "\nDOMAIN %d:\n\n", domain); + for (flind = 0; flind < vm_nfreelists; flind++) + sbuf_printf(&sbuf, " [%d]:\t%p\n", flind, + vm_phys_lookup_lists[domain][flind]); + } + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + sbuf_delete(&sbuf); + free(cbuf, M_TEMP); + return (error); +} +#endif + /* * Create a physical memory segment. */ static void -vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind) +_vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind, int domain) { struct vm_phys_seg *seg; #ifdef VM_PHYSSEG_SPARSE @@ -188,14 +238,51 @@ vm_phys_create_seg(vm_paddr_t start, vm_ seg = &vm_phys_segs[vm_phys_nsegs++]; seg->start = start; seg->end = end; + seg->domain = domain; #ifdef VM_PHYSSEG_SPARSE seg->first_page = &vm_page_array[pages]; #else seg->first_page = PHYS_TO_VM_PAGE(start); #endif +#if VM_NDOMAIN > 1 + if (flind == VM_FREELIST_DEFAULT && domain != 0) { + flind = VM_NFREELIST + (domain - 1); + if (flind >= vm_nfreelists) + vm_nfreelists = flind + 1; + } +#endif seg->free_queues = &vm_phys_free_queues[flind]; } +static void +vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind) +{ + int i; + + if (mem_affinity == NULL) { + _vm_phys_create_seg(start, end, flind, 0); + return; + } + + for (i = 0;; i++) { + if (mem_affinity[i].end == 0) + panic("Reached end of affinity info"); + if (mem_affinity[i].end <= start) + continue; + if (mem_affinity[i].start > start) + panic("No affinity info for start %jx", + (uintmax_t)start); + if (mem_affinity[i].end >= end) { + _vm_phys_create_seg(start, end, flind, + mem_affinity[i].domain); + break; + } + _vm_phys_create_seg(start, mem_affinity[i].end, flind, + mem_affinity[i].domain); + start = mem_affinity[i].end; + } +} + /* * Initialize the physical memory allocator. */ @@ -204,6 +291,9 @@ vm_phys_init(void) { struct vm_freelist *fl; int flind, i, oind, pind; +#if VM_NDOMAIN > 1 + int ndomains, j; +#endif for (i = 0; phys_avail[i + 1] != 0; i += 2) { #ifdef VM_FREELIST_ISADMA @@ -246,6 +336,37 @@ vm_phys_init(void) TAILQ_INIT(&fl[oind].pl); } } +#if VM_NDOMAIN > 1 + /* + * Build a free list lookup list for each domain. All of the + * memory domain lists are inserted at the VM_FREELIST_DEFAULT + * index in a round-robin order starting with the current + * domain. + */ + ndomains = vm_nfreelists - VM_NFREELIST + 1; + for (flind = 0; flind < VM_FREELIST_DEFAULT; flind++) + for (i = 0; i < ndomains; i++) + vm_phys_lookup_lists[i][flind] = + &vm_phys_free_queues[flind]; + for (i = 0; i < ndomains; i++) + for (j = 0; j < ndomains; j++) { + flind = (i + j) % ndomains; + if (flind == 0) + flind = VM_FREELIST_DEFAULT; + else + flind += VM_NFREELIST - 1; + vm_phys_lookup_lists[i][VM_FREELIST_DEFAULT + j] = + &vm_phys_free_queues[flind]; + } + for (flind = VM_FREELIST_DEFAULT + 1; flind < VM_NFREELIST; + flind++) + for (i = 0; i < ndomains; i++) + vm_phys_lookup_lists[i][flind + ndomains - 1] = + &vm_phys_free_queues[flind]; +#else + for (flind = 0; flind < vm_nfreelists; flind++) + vm_phys_lookup_lists[0][flind] = &vm_phys_free_queues[flind]; +#endif } /* @@ -321,7 +442,7 @@ vm_phys_alloc_freelist_pages(int flind, { struct vm_freelist *fl; struct vm_freelist *alt; - int oind, pind; + int domain, oind, pind; vm_page_t m; KASSERT(flind < VM_NFREELIST, @@ -330,8 +451,14 @@ vm_phys_alloc_freelist_pages(int flind, ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool)); KASSERT(order < VM_NFREEORDER, ("vm_phys_alloc_freelist_pages: order %d is out of range", order)); + +#if VM_NDOMAIN > 1 + domain = PCPU_GET(domain); +#else + domain = 0; +#endif mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - fl = vm_phys_free_queues[flind][pool]; + fl = (*vm_phys_lookup_lists[domain][flind])[pool]; for (oind = order; oind < VM_NFREEORDER; oind++) { m = TAILQ_FIRST(&fl[oind].pl); if (m != NULL) { @@ -351,7 +478,7 @@ vm_phys_alloc_freelist_pages(int flind, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***