svn commit: r203773 - head/lib/libusb
Author: wkoszek Date: Thu Feb 11 08:24:35 2010 New Revision: 203773 URL: http://svn.freebsd.org/changeset/base/203773 Log: Within libusb 0.1 API, bus number is always faked to 0. Device numbers, however, are possitive and seem to be reverse sorted in the list. Conform device numbering and bring a result that is consistent with the libusb 0.1 API. It is now possible to distinguish a device based on its (bus, dev) numbers. There shouldn't be any negative change in behavior after this commit. Tested with:scanimage (sane) http://freebsd.czest.pl/~wkoszek/qemu/l.c Reviewed by:hps@ Modified: head/lib/libusb/libusb20_compat01.c Modified: head/lib/libusb/libusb20_compat01.c == --- head/lib/libusb/libusb20_compat01.c Thu Feb 11 07:09:04 2010 (r203772) +++ head/lib/libusb/libusb20_compat01.c Thu Feb 11 08:24:35 2010 (r203773) @@ -829,6 +829,7 @@ usb_find_devices(void) struct libusb20_device *pdev; struct usb_device *udev; struct LIBUSB20_DEVICE_DESC_DECODED *ddesc; + int devnum; int err; /* cleanup after last device search */ @@ -855,6 +856,7 @@ usb_find_devices(void) } /* iterate all devices */ + devnum = 1; pdev = NULL; while ((pdev = libusb20_be_device_foreach(usb_backend, pdev))) { udev = malloc(sizeof(*udev)); @@ -891,6 +893,7 @@ usb_find_devices(void) /* truncate number of configurations */ udev->descriptor.bNumConfigurations = USB_MAXCONFIG; } + udev->devnum = devnum++; /* link together the two structures */ udev->dev = pdev; pdev->privLuData = udev; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203774 - head/lib/libusb
Author: wkoszek Date: Thu Feb 11 08:30:43 2010 New Revision: 203774 URL: http://svn.freebsd.org/changeset/base/203774 Log: Use more standard way for setting nonblocking flag for a filedescriptor. This makes libusb porting a bit easier. There shouldn't by any negative change in behaviour after this commit. Remove redundant headers. Reviewed by: hps@ Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c == --- head/lib/libusb/libusb10.c Thu Feb 11 08:24:35 2010(r203773) +++ head/lib/libusb/libusb10.c Thu Feb 11 08:30:43 2010(r203774) @@ -25,17 +25,16 @@ * SUCH DAMAGE. */ +#include #include #include #include #include #include -#include #include #include -#include +#include #include -#include #include "libusb20.h" #include "libusb20_desc.h" @@ -73,6 +72,7 @@ libusb_init(libusb_context **context) { struct libusb_context *ctx; char *debug; + int flag; int ret; ctx = malloc(sizeof(*ctx)); @@ -103,10 +103,12 @@ libusb_init(libusb_context **context) return (LIBUSB_ERROR_OTHER); } /* set non-blocking mode on the control pipe to avoid deadlock */ - ret = 1; - ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); - ret = 1; - ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); + flag = 1; + ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); + flag = 1; + ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203775 - head/lib/libusb
Author: wkoszek Date: Thu Feb 11 08:34:41 2010 New Revision: 203775 URL: http://svn.freebsd.org/changeset/base/203775 Log: Remove redundand headers and use more standard ones where necessary. Reviewed by: hps@ Modified: head/lib/libusb/libusb.h head/lib/libusb/libusb10_desc.c head/lib/libusb/libusb10_io.c head/lib/libusb/libusb20_desc.c head/lib/libusb/libusb20_ugen20.c head/lib/libusb/usb.h Modified: head/lib/libusb/libusb.h == --- head/lib/libusb/libusb.hThu Feb 11 08:30:43 2010(r203774) +++ head/lib/libusb/libusb.hThu Feb 11 08:34:41 2010(r203775) @@ -29,12 +29,7 @@ #include #include -#include -#include -#include -#include -#include #ifdef __cplusplus Modified: head/lib/libusb/libusb10_desc.c == --- head/lib/libusb/libusb10_desc.c Thu Feb 11 08:30:43 2010 (r203774) +++ head/lib/libusb/libusb10_desc.c Thu Feb 11 08:34:41 2010 (r203775) @@ -26,7 +26,6 @@ #include #include -#include #include #include "libusb20.h" Modified: head/lib/libusb/libusb10_io.c == --- head/lib/libusb/libusb10_io.c Thu Feb 11 08:30:43 2010 (r203774) +++ head/lib/libusb/libusb10_io.c Thu Feb 11 08:34:41 2010 (r203775) @@ -32,7 +32,6 @@ #include #include #include -#include #include "libusb20.h" #include "libusb20_desc.h" Modified: head/lib/libusb/libusb20_desc.c == --- head/lib/libusb/libusb20_desc.c Thu Feb 11 08:30:43 2010 (r203774) +++ head/lib/libusb/libusb20_desc.c Thu Feb 11 08:34:41 2010 (r203775) @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "libusb20.h" Modified: head/lib/libusb/libusb20_ugen20.c == --- head/lib/libusb/libusb20_ugen20.c Thu Feb 11 08:30:43 2010 (r203774) +++ head/lib/libusb/libusb20_ugen20.c Thu Feb 11 08:34:41 2010 (r203775) @@ -31,7 +31,6 @@ #include #include #include -#include #include #include Modified: head/lib/libusb/usb.h == --- head/lib/libusb/usb.h Thu Feb 11 08:30:43 2010(r203774) +++ head/lib/libusb/usb.h Thu Feb 11 08:34:41 2010(r203775) @@ -27,8 +27,7 @@ #ifndef _LIBUSB20_COMPAT_01_H_ #define_LIBUSB20_COMPAT_01_H_ -#include -#include +#include #include #include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203776 - head/sys/dev/acpica
Author: avg Date: Thu Feb 11 08:50:21 2010 New Revision: 203776 URL: http://svn.freebsd.org/changeset/base/203776 Log: acpi cpu: probe+attach before all other enumerated children on acpi bus Some current systems dynamically load SSDT(s) when _PDC/_OSC method of Processor is evaluated. Other devices in ACPI namespace may access objects defined in the dynamic SSDT. Drivers for such devices might have to have a rather high priority, because of other dependencies. Good example is acpi_ec driver for EC. Thus we attach to Processors as early as possible to load the SSDTs before any other drivers may try to evaluate control methods. It also seems to be a natural order for a processor in a device hierarchy. On the other hand, some child devices on acpi cpu bus need to access other system resources like PCI configuration space of chipset devices, so they need to be probed and attached rather late. For this reason we probe and attach the cpu bus at SI_SUB_CONFIGURE:SI_ORDER_MIDDLE SYSINIT level. In the future this could be done more elegantly via multipass. Please note that acpi drivers that might access ACPI namespace from device_identify will do that before _PDC/_OSC of Processors are evaluated. Legacy cpu driver is not affected by this change. PR: kern/142561 (in part) Reviewed by: jhb Silence from: acpi@ MFC after:5 weeks Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Thu Feb 11 08:34:41 2010(r203775) +++ head/sys/dev/acpica/acpi.c Thu Feb 11 08:50:21 2010(r203776) @@ -1685,14 +1685,14 @@ acpi_probe_order(ACPI_HANDLE handle, int * 10. CPUs */ AcpiGetType(handle, &type); -if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02")) +if (type == ACPI_TYPE_PROCESSOR) *order = 1; -else if (acpi_MatchHid(handle, "PNP0C09")) +else if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02")) *order = 2; -else if (acpi_MatchHid(handle, "PNP0C0F")) +else if (acpi_MatchHid(handle, "PNP0C09")) *order = 3; -else if (type == ACPI_TYPE_PROCESSOR) - *order = 10; +else if (acpi_MatchHid(handle, "PNP0C0F")) + *order = 4; } /* Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Thu Feb 11 08:34:41 2010 (r203775) +++ head/sys/dev/acpica/acpi_cpu.c Thu Feb 11 08:50:21 2010 (r203776) @@ -384,13 +384,31 @@ acpi_cpu_attach(device_t dev) /* Probe for Cx state support. */ acpi_cpu_cx_probe(sc); -/* Finally, call identify and probe/attach for child devices. */ -bus_generic_probe(dev); -bus_generic_attach(dev); - return (0); } +static void +acpi_cpu_postattach(void *unused __unused) +{ +device_t *devices; +int err; +int i, n; + +err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); +if (err != 0) { + printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); + return; +} +for (i = 0; i < n; i++) + bus_generic_probe(devices[i]); +for (i = 0; i < n; i++) + bus_generic_attach(devices[i]); +free(devices, M_TEMP); +} + +SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, +acpi_cpu_postattach, NULL); + /* * Disable any entry to the idle function during suspend and re-enable it * during resume. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys
On Wed, Feb 10, 2010 at 08:20:37PM -0800, Marcel Moolenaar wrote: > > On Feb 10, 2010, at 1:15 AM, Kostik Belousov wrote: > > > > Vnode locks are before vm map locks in global lock order. vn_fullpath() > > may need to lock vnodes to call VOP_VPTOCNP(). I think you should (and > > can) drop both vm map lock and vmspace reference much earlier. > > > > Would it be cleaner to use explicitely sized types for compat32 > > structure members ? > > I don't know. I prefer to keep them identical for as much as > that's possible. > > > Comparing ptrace_vm_entry with kinfo_vmentry, I think that it might > > be good idea to add fsid and inode number to ptrace_vm_entry, to > > give at least some information when vn_fullpath failed. > > How about the attached new path (includes man page as well)? > Looks good to me. pgpuUF2p08URw.pgp Description: PGP signature
svn commit: r203778 - head/lib/libc/posix1e
Author: trhodes Date: Thu Feb 11 14:45:00 2010 New Revision: 203778 URL: http://svn.freebsd.org/changeset/base/203778 Log: Correct two typoes. Submitted by: Matthew Seaman Modified: head/lib/libc/posix1e/mac.3 Modified: head/lib/libc/posix1e/mac.3 == --- head/lib/libc/posix1e/mac.3 Thu Feb 11 09:55:45 2010(r203777) +++ head/lib/libc/posix1e/mac.3 Thu Feb 11 14:45:00 2010(r203778) @@ -155,7 +155,7 @@ system objects, but without policy-speci These APIs are loosely based on the APIs described in POSIX.1e, as described in IEEE POSIX.1e draft 17. However, the resemblence of these APIS to the POSIX APIs is loose, as the -PSOXI APIS were unable to express some notinos required for flexible and +POSIX APIS were unable to express some notions required for flexible and extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203780 - head/share/zoneinfo
Author: nork Date: Thu Feb 11 15:34:54 2010 New Revision: 203780 URL: http://svn.freebsd.org/changeset/base/203780 Log: Fix a installation issue with $DESTDIR. Approved by: imp (mentor) Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile == --- head/share/zoneinfo/MakefileThu Feb 11 15:03:56 2010 (r203779) +++ head/share/zoneinfo/MakefileThu Feb 11 15:34:54 2010 (r203780) @@ -68,7 +68,7 @@ afterinstall: optC="-C ${DESTDIR}"; \ fi; \ echo "Updating /etc/localtime"; \ - tzsetup ${optC} -r; \ + tzsetup $${optC} -r; \ fi; \ else \ echo "Run tzsetup(8) manually to update /etc/localtime."; \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203782 - head/lib/libufs
Author: imp Date: Thu Feb 11 17:30:30 2010 New Revision: 203782 URL: http://svn.freebsd.org/changeset/base/203782 Log: i doesn't need to be signed here, make it unsigned. Modified: head/lib/libufs/sblock.c Modified: head/lib/libufs/sblock.c == --- head/lib/libufs/sblock.cThu Feb 11 15:36:39 2010(r203781) +++ head/lib/libufs/sblock.cThu Feb 11 17:30:30 2010(r203782) @@ -93,7 +93,7 @@ int sbwrite(struct uufsd *disk, int all) { struct fs *fs; - int i; + unsigned i; ERROR(disk, NULL); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203783 - in head: lib/libc/sys sys/kern sys/sys
Author: marcel Date: Thu Feb 11 18:00:53 2010 New Revision: 203783 URL: http://svn.freebsd.org/changeset/base/203783 Log: o Add support for COMPAT_IA32. o Incorporate review comments: - Properly reference and lock the map - Take into account that the VM map can change inbetween requests - Add the fileid and fsid attributes Credits: kib@ Reviewed by: kib@ Modified: head/lib/libc/sys/ptrace.2 head/sys/kern/sys_process.c head/sys/sys/ptrace.h Modified: head/lib/libc/sys/ptrace.2 == --- head/lib/libc/sys/ptrace.2 Thu Feb 11 17:30:30 2010(r203782) +++ head/lib/libc/sys/ptrace.2 Thu Feb 11 18:00:53 2010(r203783) @@ -2,7 +2,7 @@ .\"$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd February 8, 2010 +.Dd February 11, 2010 .Dt PTRACE 2 .Os .Sh NAME @@ -343,23 +343,30 @@ argument specifies a pointer to a which is defined as follows: .Bd -literal struct ptrace_vm_entry { - void*pve_cookie; - u_long pve_start; - u_long pve_end; - u_long pve_offset; - u_int pve_prot; - u_int pve_pathlen; - char*pve_path; + int pve_entry; + int pve_timestamp; + u_long pve_start; + u_long pve_end; + u_long pve_offset; + u_int pve_prot; + u_int pve_pathlen; + longpve_fileid; + uint32_tpve_fsid; + char*pve_path; }; .Ed .Pp The first entry is returned by setting -.Va pve_cookie -to -.Dv NULL . +.Va pve_entry +to zero. Subsequent entries are returned by leaving -.Va pve_cookie +.Va pve_entry unmodified from the value returned by previous requests. +The +.Va pve_timestamp +field can be used to detect changes to the VM map while iterating over the +entries. +The tracing process can then take appropriate action, such as restarting. By setting .Va pve_pathlen to a non-zero value on entry, the pathname of the backing object is returned @@ -434,7 +441,8 @@ was attempted on a process with no valid .It .Dv PT_VM_ENTRY was given an invalid value for -.Fa pve_cookie . +.Fa pve_entry . +This can also be caused by changes to the VM map of the process. .El .It Bq Er EBUSY .Bl -bullet -compact Modified: head/sys/kern/sys_process.c == --- head/sys/kern/sys_process.c Thu Feb 11 17:30:30 2010(r203782) +++ head/sys/kern/sys_process.c Thu Feb 11 18:00:53 2010(r203783) @@ -75,12 +75,15 @@ struct ptrace_io_desc32 { }; struct ptrace_vm_entry32 { - uint32_tpve_cookie; + int pve_entry; + int pve_timestamp; uint32_tpve_start; uint32_tpve_end; uint32_tpve_offset; u_int pve_prot; u_int pve_pathlen; + int32_t pve_fileid; + u_int pve_fsid; uint32_tpve_path; }; @@ -360,88 +363,141 @@ proc_rwmem(struct proc *p, struct uio *u static int ptrace_vm_entry(struct thread *td, struct proc *p, struct ptrace_vm_entry *pve) { + struct vattr vattr; vm_map_t map; vm_map_entry_t entry; vm_object_t obj, tobj, lobj; + struct vmspace *vm; struct vnode *vp; char *freepath, *fullpath; u_int pathlen; - int error, vfslocked; + int error, index, vfslocked; - map = &p->p_vmspace->vm_map; - entry = map->header.next; - if (pve->pve_cookie != NULL) { - while (entry != &map->header && entry != pve->pve_cookie) + error = 0; + obj = NULL; + + vm = vmspace_acquire_ref(p); + map = &vm->vm_map; + vm_map_lock_read(map); + + do { + entry = map->header.next; + index = 0; + while (index < pve->pve_entry && entry != &map->header) { entry = entry->next; - if (entry != pve->pve_cookie) - return (EINVAL); - entry = entry->next; - } - while (entry != &map->header && (entry->eflags & MAP_ENTRY_IS_SUB_MAP)) - entry = entry->next; - if (entry == &map->header) - return (ENOENT); - - /* We got an entry. */ - pve->pve_cookie = entry; - pve->pve_start = entry->start; - pve->pve_end = entry->end - 1; - pve->pve_offset = entry->offset; - pve->pve_prot = entry->protection; - - /* Backing object's path needed? */ - if (pve->pve_pathlen == 0) - return (0); - - pathlen = pve->pve_pathlen; - pve->pve_pathlen = 0; - - obj = entry->object.vm_object; - if (obj == NULL) - return (0); - - VM_OBJECT_LOCK(obj); - for (lo
svn commit: r203784 - in head: sbin/newfs sys/ufs/ffs
Author: mckusick Date: Thu Feb 11 18:14:53 2010 New Revision: 203784 URL: http://svn.freebsd.org/changeset/base/203784 Log: One last pass to get all the unsigned comparisons correct. Modified: head/sbin/newfs/mkfs.c head/sys/ufs/ffs/fs.h Modified: head/sbin/newfs/mkfs.c == --- head/sbin/newfs/mkfs.c Thu Feb 11 18:00:53 2010(r203783) +++ head/sbin/newfs/mkfs.c Thu Feb 11 18:14:53 2010(r203784) @@ -114,7 +114,8 @@ void mkfs(struct partition *pp, char *fsys) { int fragsperinode, optimalfpg, origdensity, minfpg, lastminfpg; - long i, j, cylno, csfrags; + long i, j, csfrags; + uint cg; time_t utime; quad_t sizepb; int width; @@ -510,9 +511,9 @@ restart: fsdummy.fs_magic = 0; bwrite(&disk, part_ofs + SBLOCK_UFS1 / disk.d_bsize, chdummy, SBLOCKSIZE); - for (i = 0; i < fsdummy.fs_ncg; i++) + for (cg = 0; cg < fsdummy.fs_ncg; cg++) bwrite(&disk, part_ofs + fsbtodb(&fsdummy, - cgsblock(&fsdummy, i)), chdummy, SBLOCKSIZE); + cgsblock(&fsdummy, cg)), chdummy, SBLOCKSIZE); } } if (!Nflag) @@ -550,11 +551,11 @@ restart: * writing out in each cylinder group. */ bcopy((char *)&sblock, iobuf, SBLOCKSIZE); - for (cylno = 0; cylno < sblock.fs_ncg; cylno++) { - initcg(cylno, utime); + for (cg = 0; cg < sblock.fs_ncg; cg++) { + initcg(cg, utime); j = snprintf(tmpbuf, sizeof(tmpbuf), " %jd%s", - (intmax_t)fsbtodb(&sblock, cgsblock(&sblock, cylno)), - cylno < (sblock.fs_ncg-1) ? "," : ""); + (intmax_t)fsbtodb(&sblock, cgsblock(&sblock, cg)), + cg < (sblock.fs_ncg-1) ? "," : ""); if (j < 0) tmpbuf[j = 0] = '\0'; if (i + j >= width) { @@ -608,7 +609,8 @@ restart: void initcg(int cylno, time_t utime) { - long i, j, d, dlower, dupper, blkno, start; + long blkno, start; + uint i, j, d, dlower, dupper; ufs2_daddr_t cbase, dmax; struct ufs1_dinode *dp1; struct ufs2_dinode *dp2; @@ -665,7 +667,7 @@ initcg(int cylno, time_t utime) acg.cg_nextfreeoff = acg.cg_clusteroff + howmany(fragstoblks(&sblock, sblock.fs_fpg), CHAR_BIT); } - if (acg.cg_nextfreeoff > sblock.fs_cgsize) { + if (acg.cg_nextfreeoff > (unsigned)sblock.fs_cgsize) { printf("Panic: cylinder group too big\n"); exit(37); } @@ -914,7 +916,8 @@ makedir(struct direct *protodir, int ent ufs2_daddr_t alloc(int size, int mode) { - int i, d, blkno, frag; + int i, blkno, frag; + uint d; bread(&disk, part_ofs + fsbtodb(&sblock, cgtod(&sblock, 0)), (char *)&acg, sblock.fs_cgsize); Modified: head/sys/ufs/ffs/fs.h == --- head/sys/ufs/ffs/fs.h Thu Feb 11 18:00:53 2010(r203783) +++ head/sys/ufs/ffs/fs.h Thu Feb 11 18:14:53 2010(r203784) @@ -287,7 +287,7 @@ struct fs { int32_t fs_spare1[2]; /* old fs_csmask */ /* old fs_csshift */ int32_t fs_nindir; /* value of NINDIR */ - int32_t fs_inopb; /* value of INOPB */ + u_int32_t fs_inopb; /* value of INOPB */ int32_t fs_old_nspf; /* value of NSPF */ /* yet another configuration parameter */ int32_t fs_optim; /* optimization preference, see below */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203785 - head/sys/dev/acpica
Author: avg Date: Thu Feb 11 18:24:00 2010 New Revision: 203785 URL: http://svn.freebsd.org/changeset/base/203785 Log: acpi: drop the second bus_generic_attach pass It is belived that that pass s not needed anymore. Specifically it is not required now for the reasons that were given in the removed comment. Discussed with: jhb MFC after:4 weeks Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Thu Feb 11 18:14:53 2010(r203784) +++ head/sys/dev/acpica/acpi.c Thu Feb 11 18:24:00 2010(r203785) @@ -1653,14 +1653,7 @@ acpi_probe_children(device_t bus) bus_generic_probe(bus); /* Probe/attach all children, created staticly and from the namespace. */ -ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "first bus_generic_attach\n")); -bus_generic_attach(bus); - -/* - * Some of these children may have attached others as part of their attach - * process (eg. the root PCI bus driver), so rescan. - */ -ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "second bus_generic_attach\n")); +ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "acpi bus_generic_attach\n")); bus_generic_attach(bus); /* Attach wake sysctls. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203786 - in stable/8/sys: cam/scsi compat/linux dev/aac dev/agp dev/amd dev/amr dev/arcmsr dev/ata dev/ata/chipsets dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5416...
Author: mjacob Date: Thu Feb 11 18:34:06 2010 New Revision: 203786 URL: http://svn.freebsd.org/changeset/base/203786 Log: MFC a number of changes from head for ISP (203478,203463,203444,202418,201758, 201408,201325,200089,198822,197373,197372,197214,196162). Since one of those changes was a semicolon cleanup from somebody else, this touches a lot more. Deleted: stable/8/sys/dev/isp/isp_tpublic.h Modified: stable/8/sys/cam/scsi/scsi_ses.c stable/8/sys/cam/scsi/scsi_targ_bh.c stable/8/sys/compat/linux/linux_futex.c stable/8/sys/dev/aac/aac.c stable/8/sys/dev/agp/agp.c stable/8/sys/dev/amd/amd.c stable/8/sys/dev/amr/amr.c stable/8/sys/dev/arcmsr/arcmsr.c stable/8/sys/dev/ata/ata-raid.c stable/8/sys/dev/ata/chipsets/ata-ahci.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c stable/8/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c stable/8/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c stable/8/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c stable/8/sys/dev/bktr/bktr_i2c.c stable/8/sys/dev/cs/if_cs.c stable/8/sys/dev/cxgb/cxgb_sge.c stable/8/sys/dev/de/if_de.c stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/fatm/if_fatm.c stable/8/sys/dev/firewire/sbp.c stable/8/sys/dev/hatm/if_hatm.c stable/8/sys/dev/hptmv/entry.c stable/8/sys/dev/if_ndis/if_ndis_usb.c stable/8/sys/dev/iscsi/initiator/isc_sm.c stable/8/sys/dev/isp/isp.c stable/8/sys/dev/isp/isp_freebsd.c stable/8/sys/dev/isp/isp_freebsd.h stable/8/sys/dev/isp/isp_library.c stable/8/sys/dev/isp/isp_library.h stable/8/sys/dev/isp/isp_pci.c stable/8/sys/dev/isp/isp_sbus.c stable/8/sys/dev/isp/isp_stds.h stable/8/sys/dev/isp/ispmbox.h stable/8/sys/dev/isp/ispvar.h stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/malo/if_malo.c stable/8/sys/dev/mge/if_mge.c stable/8/sys/dev/mxge/if_mxge.c stable/8/sys/dev/patm/if_patm_intr.c stable/8/sys/dev/pdq/if_fea.c stable/8/sys/dev/safe/safe.c stable/8/sys/dev/sound/pci/maestro3.c stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/trm/trm.c stable/8/sys/dev/usb/controller/musb_otg.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c stable/8/sys/isa/pnp.c stable/8/sys/kern/kern_fail.c stable/8/sys/kern/subr_firmware.c stable/8/sys/mips/adm5120/if_admsw.c stable/8/sys/mips/mips/elf_machdep.c stable/8/sys/net/flowtable.c stable/8/sys/net80211/ieee80211_node.c stable/8/sys/netinet/libalias/alias_db.c stable/8/sys/netinet/libalias/alias_mod.c stable/8/sys/netinet/sctp_asconf.c stable/8/sys/netinet/sctputil.c stable/8/sys/nfsclient/bootp_subr.c stable/8/sys/pci/ncr.c stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/booke/pmap.c stable/8/sys/rpc/clnt_dg.c stable/8/sys/ufs/ffs/ffs_snapshot.c stable/8/sys/xen/xenbus/xenbus_probe.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_ses.c == --- stable/8/sys/cam/scsi/scsi_ses.cThu Feb 11 18:24:00 2010 (r203785) +++ stable/8/sys/cam/scsi/scsi_ses.cThu Feb 11 18:34:06 2010 (r203786) @@ -1555,7 +1555,7 @@ ses_encode(char *b, int amt, uint8_t *ep */ static int safte_getconfig(ses_softc_t *); -static int safte_rdstat(ses_softc_t *, int);; +static int safte_rdstat(ses_softc_t *, int); static int set_objstat_sel(ses_softc_t *, ses_objstat *, int); static int wrbuf16(ses_softc_t *, uint8_t, uint8_t, uint8_t, uint8_t, int); static void wrslot_stat(ses_softc_t *, int); @@ -2257,7 +2257,7 @@ safte_rdstat(ses_softc_t *ssc, int slpfl ssc->ses_objmap[oid].encstat[0] = SES_OBJSTAT_NOTAVAIL; ssc->ses_objmap[oid].encstat[1] = 0; ssc->ses_objmap[oid].encstat[2] = sdata[r]; - ssc->ses_objmap[oid].encstat[3] = 0;; + ssc->ses_objmap[oid].encstat[3] = 0; ssc->ses_objmap[oid++].svalid = 1; r++; } Modified: stable/8/sys/cam/scsi/scsi_targ_bh.c == --- stable/8/sys/cam/scsi/scsi_targ_bh.cThu Feb 11 18:24:00 2010 (r203785) +++ stable/8/sys/cam/scsi/scsi_targ_bh.cThu Feb 11 18:34:06 2010 (r203786) @@ -429,7 +429,7 @@ targbhdtor(struct cam_periph *periph) switch (softc->init_level) { case 0: - panic("targdtor - impossible init level");; + panic("targdtor - impossible init level"); case 1: /* FALLTHROUGH */ default: Modified: stable/8/sys/compat/linux/linux_futex.c =
svn commit: r203787 - head/lib/libc/posix1e
Author: trhodes Date: Thu Feb 11 19:20:06 2010 New Revision: 203787 URL: http://svn.freebsd.org/changeset/base/203787 Log: s/APIS/APIs - not part of the original submission. Modified: head/lib/libc/posix1e/mac.3 Modified: head/lib/libc/posix1e/mac.3 == --- head/lib/libc/posix1e/mac.3 Thu Feb 11 18:34:06 2010(r203786) +++ head/lib/libc/posix1e/mac.3 Thu Feb 11 19:20:06 2010(r203787) @@ -154,8 +154,8 @@ system objects, but without policy-speci .Sh STANDARDS These APIs are loosely based on the APIs described in POSIX.1e, as described in IEEE POSIX.1e draft 17. -However, the resemblence of these APIS to the POSIX APIs is loose, as the -POSIX APIS were unable to express some notions required for flexible and +However, the resemblence of these APIs to the POSIX APIs is loose, as the +POSIX APIs were unable to express some notions required for flexible and extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r203785 - head/sys/dev/acpica
On Thursday 11 February 2010 1:24:00 pm Andriy Gapon wrote: > Author: avg > Date: Thu Feb 11 18:24:00 2010 > New Revision: 203785 > URL: http://svn.freebsd.org/changeset/base/203785 > > Log: > acpi: drop the second bus_generic_attach pass > > It is belived that that pass s not needed anymore. > Specifically it is not required now for the reasons that were given > in the removed comment. > > Discussed with: jhb > MFC after: 4 weeks I suspect it was in fact never required in the version of acpi that was in the FreeBSD source tree. It may have been required at some point in the early stages of acpi development when the drivers were not yet part of the base system. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203788 - head/sys/kern
Author: marcel Date: Thu Feb 11 21:10:56 2010 New Revision: 203788 URL: http://svn.freebsd.org/changeset/base/203788 Log: Initialize pve_fsid and pve_fileid to VNOVAL. Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c == --- head/sys/kern/sys_process.c Thu Feb 11 19:20:06 2010(r203787) +++ head/sys/kern/sys_process.c Thu Feb 11 21:10:56 2010(r203788) @@ -424,6 +424,9 @@ ptrace_vm_entry(struct thread *td, struc vm_map_unlock_read(map); vmspace_free(vm); + pve->pve_fsid = VNOVAL; + pve->pve_fileid = VNOVAL; + if (error == 0 && obj != NULL) { lobj = obj; for (tobj = obj; tobj != NULL; tobj = tobj->backing_object) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203789 - stable/8/sys/fs/nfsclient
Author: rmacklem Date: Thu Feb 11 21:25:48 2010 New Revision: 203789 URL: http://svn.freebsd.org/changeset/base/203789 Log: MFC: r203119 Patch the experimental NFS client in a manner analogous to r203072 for the regular NFS client. Also, delete two fields of struct nfsmount that are not used by the FreeBSD port of the client. Modified: stable/8/sys/fs/nfsclient/nfs.h stable/8/sys/fs/nfsclient/nfs_clbio.c stable/8/sys/fs/nfsclient/nfs_clnfsiod.c stable/8/sys/fs/nfsclient/nfs_clsubs.c stable/8/sys/fs/nfsclient/nfsmount.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs.h == --- stable/8/sys/fs/nfsclient/nfs.h Thu Feb 11 21:10:56 2010 (r203788) +++ stable/8/sys/fs/nfsclient/nfs.h Thu Feb 11 21:25:48 2010 (r203789) @@ -56,6 +56,19 @@ (VFSTONFS((v)->v_mount)->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) /* + * NFS iod threads can be in one of these three states once spawned. + * NFSIOD_NOT_AVAILABLE - Cannot be assigned an I/O operation at this time. + * NFSIOD_AVAILABLE - Available to be assigned an I/O operation. + * NFSIOD_CREATED_FOR_NFS_ASYNCIO - Newly created for nfs_asyncio() and + * will be used by the thread that called nfs_asyncio(). + */ +enum nfsiod_state { + NFSIOD_NOT_AVAILABLE = 0, + NFSIOD_AVAILABLE = 1, + NFSIOD_CREATED_FOR_NFS_ASYNCIO = 2, +}; + +/* * Function prototypes. */ int ncl_meta_setsize(struct vnode *, struct ucred *, struct thread *, @@ -87,7 +100,7 @@ int ncl_fsinfo(struct nfsmount *, struct int ncl_init(struct vfsconf *); int ncl_uninit(struct vfsconf *); int ncl_mountroot(struct mount *); -int ncl_nfsiodnew(void); +int ncl_nfsiodnew(int); #endif /* _KERNEL */ Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c == --- stable/8/sys/fs/nfsclient/nfs_clbio.c Thu Feb 11 21:10:56 2010 (r203788) +++ stable/8/sys/fs/nfsclient/nfs_clbio.c Thu Feb 11 21:25:48 2010 (r203789) @@ -63,7 +63,7 @@ extern int newnfs_directio_allow_mmap; extern struct nfsstats newnfsstats; extern struct mtx ncl_iod_mutex; extern int ncl_numasync; -extern struct proc *ncl_iodwant[NFS_MAXRAHEAD]; +extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD]; extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD]; extern int newnfs_directio_enable; @@ -1396,7 +1396,7 @@ again: * Find a free iod to process this request. */ for (iod = 0; iod < ncl_numasync; iod++) - if (ncl_iodwant[iod]) { + if (ncl_iodwant[iod] == NFSIOD_AVAILABLE) { gotiod = TRUE; break; } @@ -1405,7 +1405,7 @@ again: * Try to create one if none are free. */ if (!gotiod) { - iod = ncl_nfsiodnew(); + iod = ncl_nfsiodnew(1); if (iod != -1) gotiod = TRUE; } @@ -1417,7 +1417,7 @@ again: */ NFS_DPF(ASYNCIO, ("ncl_asyncio: waking iod %d for mount %p\n", iod, nmp)); - ncl_iodwant[iod] = NULL; + ncl_iodwant[iod] = NFSIOD_NOT_AVAILABLE; ncl_iodmount[iod] = nmp; nmp->nm_bufqiods++; wakeup(&ncl_iodwant[iod]); Modified: stable/8/sys/fs/nfsclient/nfs_clnfsiod.c == --- stable/8/sys/fs/nfsclient/nfs_clnfsiod.cThu Feb 11 21:10:56 2010 (r203788) +++ stable/8/sys/fs/nfsclient/nfs_clnfsiod.cThu Feb 11 21:25:48 2010 (r203789) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); extern struct mtx ncl_iod_mutex; int ncl_numasync; -struct proc *ncl_iodwant[NFS_MAXRAHEAD]; +enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD]; struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD]; static voidnfssvc_iod(void *); @@ -114,7 +114,7 @@ sysctl_iodmin(SYSCTL_HANDLER_ARGS) * than the new minimum, create some more. */ for (i = nfs_iodmin - ncl_numasync; i > 0; i--) - ncl_nfsiodnew(); + ncl_nfsiodnew(0); out: mtx_unlock(&ncl_iod_mutex); return (0); @@ -147,7 +147,7 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS) */ iod = ncl_numasync - 1; for (i = 0; i < ncl_numasync - ncl_iodmax; i++) { - if (ncl_iodwant[iod]) + if (ncl_iodwant[iod] == NFSIOD_AVAILABLE) wakeup(&ncl_iodwant[iod]); iod--; } @@ -159,7
Re: svn commit: r203788 - head/sys/kern
On Thu, Feb 11, 2010 at 09:10:56PM +, Marcel Moolenaar wrote: > Author: marcel > Date: Thu Feb 11 21:10:56 2010 > New Revision: 203788 > URL: http://svn.freebsd.org/changeset/base/203788 > > Log: > Initialize pve_fsid and pve_fileid to VNOVAL. why? ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r203788 - head/sys/kern
On Feb 11, 2010, at 1:44 PM, Roman Divacky wrote: > On Thu, Feb 11, 2010 at 09:10:56PM +, Marcel Moolenaar wrote: >> Author: marcel >> Date: Thu Feb 11 21:10:56 2010 >> New Revision: 203788 >> URL: http://svn.freebsd.org/changeset/base/203788 >> >> Log: >> Initialize pve_fsid and pve_fileid to VNOVAL. > > why? It gives the tracing process a deterministic and reliably way of knowing whether the entry is backed by a vnode or not. We won't be able to guarantee that otherwise. FYI, -- Marcel Moolenaar xcl...@mac.com ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203790 - head/usr.sbin/pmcstat
Author: fabient Date: Thu Feb 11 22:51:44 2010 New Revision: 203790 URL: http://svn.freebsd.org/changeset/base/203790 Log: - Reorganize code in 'plugin' to share log processing. - Kcachegrind (calltree) support with assembly/source code mapping and call count estimator (-F). - Top mode for calltree and callgraph plugin (-T). MFC after:1 month Added: head/usr.sbin/pmcstat/pmcpl_annotate.c (contents, props changed) head/usr.sbin/pmcstat/pmcpl_annotate.h (contents, props changed) head/usr.sbin/pmcstat/pmcpl_callgraph.c (contents, props changed) head/usr.sbin/pmcstat/pmcpl_callgraph.h (contents, props changed) head/usr.sbin/pmcstat/pmcpl_calltree.c (contents, props changed) head/usr.sbin/pmcstat/pmcpl_calltree.h (contents, props changed) head/usr.sbin/pmcstat/pmcpl_gprof.c (contents, props changed) head/usr.sbin/pmcstat/pmcpl_gprof.h (contents, props changed) head/usr.sbin/pmcstat/pmcstat_log.h (contents, props changed) head/usr.sbin/pmcstat/pmcstat_top.h (contents, props changed) Modified: head/usr.sbin/pmcstat/Makefile head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat.h head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/Makefile == --- head/usr.sbin/pmcstat/Makefile Thu Feb 11 21:25:48 2010 (r203789) +++ head/usr.sbin/pmcstat/Makefile Thu Feb 11 22:51:44 2010 (r203790) @@ -6,8 +6,9 @@ PROG= pmcstat MAN= pmcstat.8 DPADD= ${LIBELF} ${LIBKVM} ${LIBPMC} ${LIBM} -LDADD= -lelf -lkvm -lpmc -lm +LDADD= -lelf -lkvm -lpmc -lm -lncurses -SRCS= pmcstat.c pmcstat.h pmcstat_log.c +SRCS= pmcstat.c pmcstat.h pmcstat_log.c \ +pmcpl_callgraph.c pmcpl_gprof.c pmcpl_annotate.c pmcpl_calltree.c .include Added: head/usr.sbin/pmcstat/pmcpl_annotate.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pmcstat/pmcpl_annotate.c Thu Feb 11 22:51:44 2010 (r203790) @@ -0,0 +1,111 @@ +/*- + * Copyright (c) 2005-2007, Joseph Koshy + * Copyright (c) 2007 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by A. Joseph Koshy under + * sponsorship from the FreeBSD Foundation and Google, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Transform a hwpmc(4) log into human readable form, and into + * gprof(1) compatible profiles. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pmcstat.h" +#include "pmcstat_log.h" +#include "pmcpl_annotate.h" + +/* + * Record a callchain. + */ + +void +pmcpl_annotate_process(struct pmcstat_process *pp, struct pmcstat_pmcrecord *pmcr, +uint32_t nsamples, uintfptr_t *cc, int usermode, uint32_t cpu) +{ + struct pmcstat_pcmap *map; + struct pmcstat_symbol *sym; + uintfptr_t newpc; + struct pmcstat_image *image; + + (void) pmcr; (void) nsamples; (void) usermode; (void) cpu; + + map = pmcstat_process_find_map(usermode ? pp : pmcstat_kernproc, cc[0]); + if (map == NULL) { + /* Unknown offset. */ + pmcstat_stats.ps_samples_unknown_offset++; + return; + } + + assert(cc[0] >= map->ppm_lowpc && cc[0] < map->ppm_highpc); + + image = ma
Re: svn commit: r203785 - head/sys/dev/acpica
on 11/02/2010 22:05 John Baldwin said the following: > On Thursday 11 February 2010 1:24:00 pm Andriy Gapon wrote: >> Author: avg >> Date: Thu Feb 11 18:24:00 2010 >> New Revision: 203785 >> URL: http://svn.freebsd.org/changeset/base/203785 >> >> Log: >> acpi: drop the second bus_generic_attach pass >> >> It is belived that that pass s not needed anymore. >> Specifically it is not required now for the reasons that were given >> in the removed comment. >> >> Discussed with:jhb And, in fact, the above should have been "Suggested by". >> MFC after: 4 weeks > > I suspect it was in fact never required in the version of acpi that was in > the > FreeBSD source tree. It may have been required at some point in the early > stages of acpi development when the drivers were not yet part of the base > system. > -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r203794 - stable/8/sys/dev/isp
Author: mjacob Date: Fri Feb 12 00:47:23 2010 New Revision: 203794 URL: http://svn.freebsd.org/changeset/base/203794 Log: Pick up some changes the the MFC missed. Modified: stable/8/sys/dev/isp/isp.c stable/8/sys/dev/isp/isp_library.c Modified: stable/8/sys/dev/isp/isp.c == --- stable/8/sys/dev/isp/isp.c Fri Feb 12 00:45:29 2010(r203793) +++ stable/8/sys/dev/isp/isp.c Fri Feb 12 00:47:23 2010(r203794) @@ -2763,15 +2763,21 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) /* * Make sure we're okay for doing this right now. */ - if (fcp->isp_loopstate != LOOP_PDB_RCVD && fcp->isp_loopstate != LOOP_FSCAN_DONE && fcp->isp_loopstate != LOOP_LSCAN_DONE) { - isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d", fcp->isp_loopstate); + if (fcp->isp_loopstate != LOOP_PDB_RCVD && + fcp->isp_loopstate != LOOP_FSCAN_DONE && + fcp->isp_loopstate != LOOP_LSCAN_DONE) { + isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d", + fcp->isp_loopstate); return (-1); } - if (fcp->isp_topo == TOPO_FL_PORT || fcp->isp_topo == TOPO_NL_PORT || fcp->isp_topo == TOPO_N_PORT) { + if (fcp->isp_topo == TOPO_FL_PORT || + fcp->isp_topo == TOPO_NL_PORT || + fcp->isp_topo == TOPO_N_PORT) { if (fcp->isp_loopstate < LOOP_LSCAN_DONE) { if (isp_scan_loop(isp, chan) != 0) { - isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: isp_scan_loop failed"); + isp_prt(isp, ISP_LOGWARN, + "isp_pdb_sync: isp_scan_loop failed"); return (-1); } } @@ -2780,13 +2786,15 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) if (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT) { if (fcp->isp_loopstate < LOOP_FSCAN_DONE) { if (isp_scan_fabric(isp, chan) != 0) { - isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: isp_scan_fabric failed"); + isp_prt(isp, ISP_LOGWARN, + "isp_pdb_sync: isp_scan_fabric failed"); return (-1); } } } - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Synchronizing PDBs", chan); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Chan %d Synchronizing PDBs", chan); fcp->isp_loopstate = LOOP_SYNCING_PDB; @@ -2815,7 +2823,11 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); if (lp->autologin == 0) { - (void) isp_plogx(isp, chan, lp->handle, lp->portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 0); + (void) isp_plogx(isp, chan, lp->handle, + lp->portid, + PLOGX_FLG_CMD_LOGO | + PLOGX_FLG_IMPLICIT | + PLOGX_FLG_FREE_NPHDL, 0); } else { lp->autologin = 0; } @@ -3061,7 +3073,8 @@ isp_scan_loop(ispsoftc_t *isp, int chan) for (i = 0; i < MAX_FC_TARG; i++) { lp = &fcp->portdb[i]; - if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) { + if (lp->state == FC_PORTDB_STATE_NIL || + lp->target_mode) { continue; } if (lp->node_wwn != tmp.node_wwn) { @@ -3579,7 +3592,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; - if (lp->state != FC_PORTDB_STATE_PROBATIONAL || lp->target_mode) { + if (lp->state != FC_PORTDB_STATE_PROBATIONAL || + lp->target_mode) { continue; } if (lp->portid == portid) { @@ -3816,7 +3830,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (fcp->portdb[dbidx].target_mode) { continue; } - if (fcp->portdb[dbidx].node_wwn == wwnn && fcp->portdb[dbidx].port_wwn == wwpn) { + if (fcp->portdb[dbidx].node_wwn == wwnn && + fcp->portdb[dbidx].port_wwn == wwpn) { break;
svn commit: r203796 - in head/sys: conf mips/conf mips/mips mips/sibyte
Author: neel Date: Fri Feb 12 02:59:49 2010 New Revision: 203796 URL: http://svn.freebsd.org/changeset/base/203796 Log: Remove the PCI_IOSPACE_SIZE and PCI_IOSPACE_ADDR hack from nexus.c. Implement this in the Sibyte PCI hostbridge driver instead. The nexus driver sees resource allocation requests for memory and irq resources only. These are legitimate resources on all MIPS platforms. Suggested by: imp Modified: head/sys/conf/options.mips head/sys/mips/conf/SWARM head/sys/mips/mips/nexus.c head/sys/mips/sibyte/sb_zbpci.c Modified: head/sys/conf/options.mips == --- head/sys/conf/options.mips Fri Feb 12 02:26:12 2010(r203795) +++ head/sys/conf/options.mips Fri Feb 12 02:59:49 2010(r203796) @@ -61,14 +61,6 @@ TICK_USE_YAMON_FREQ opt_global.h TICK_USE_MALTA_RTC opt_global.h # -# The MIPS architecture does not have separate memory and i/o address space -# like x86. However some MIPS processors provide a memory-mapped window that -# maps onto the PCI I/O space. -# -PCI_IOSPACE_SIZEopt_global.h -PCI_IOSPACE_ADDRopt_global.h - -# # The highest memory address that can be used by the kernel in units of KB. # MAXMEM opt_global.h Modified: head/sys/mips/conf/SWARM == --- head/sys/mips/conf/SWARMFri Feb 12 02:26:12 2010(r203795) +++ head/sys/mips/conf/SWARMFri Feb 12 02:59:49 2010(r203796) @@ -8,9 +8,6 @@ options CPU_SB1 files "../sibyte/files.sibyte" hints "SWARM.hints" -optionsPCI_IOSPACE_ADDR=0xFC00 -optionsPCI_IOSPACE_SIZE=0x0200 - # # 32-bit kernel cannot deal with physical memory beyond 4GB # XXX pmap assumes that all the memory can be mapped using KSEG0 Modified: head/sys/mips/mips/nexus.c == --- head/sys/mips/mips/nexus.c Fri Feb 12 02:26:12 2010(r203795) +++ head/sys/mips/mips/nexus.c Fri Feb 12 02:59:49 2010(r203796) @@ -77,7 +77,6 @@ struct nexus_device { static struct rman irq_rman; static struct rman mem_rman; -static struct rman port_rman; static struct resource * nexus_alloc_resource(device_t, device_t, int, int *, u_long, @@ -161,21 +160,6 @@ nexus_probe(device_t dev) panic("%s: mem_rman", __func__); } - /* -* MIPS has no concept of the x86 I/O address space but some cpus -* provide a memory mapped window to access the PCI I/O BARs. -*/ - port_rman.rm_start = 0; -#ifdef PCI_IOSPACE_SIZE - port_rman.rm_end = PCI_IOSPACE_SIZE - 1; -#endif - port_rman.rm_type = RMAN_ARRAY; - port_rman.rm_descr = "I/O ports"; - if (rman_init(&port_rman) != 0 || - rman_manage_region(&port_rman, 0, port_rman.rm_end) != 0) - panic("%s: port_rman", __func__); - - return (0); } @@ -241,7 +225,6 @@ nexus_print_all_resources(device_t dev) retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx"); retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld"); - retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx"); return (retval); } @@ -368,9 +351,6 @@ nexus_alloc_resource(device_t bus, devic case SYS_RES_MEMORY: rm = &mem_rman; break; - case SYS_RES_IOPORT: - rm = &port_rman; - break; default: printf("%s: unknown resource type %d\n", __func__, type); return (0); @@ -400,21 +380,17 @@ static int nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + void *vaddr; + u_int32_t paddr, psize; + /* * If this is a memory resource, track the direct mapping * in the uncached MIPS KSEG1 segment. */ - /* XXX we shouldn't be supporting sys_res_ioport here */ - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - caddr_t vaddr = 0; - u_int32_t paddr; - u_int32_t psize; - u_int32_t poffs; - + if (type == SYS_RES_MEMORY) { paddr = rman_get_start(r); psize = rman_get_size(r); - poffs = paddr - trunc_page(paddr); - vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; + vaddr = pmap_mapdev(paddr, psize); rman_set_virtual(r, vaddr); rman_set_bustag(r, mips_bus_space_generic); @@ -501,7 +477,7 @@ nexus_deactivate_resource(device_t bus, { vm_offset_t va; - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + if (type == SYS_RES_MEMORY) { va
Re: svn commit: r203796 - in head/sys: conf mips/conf mips/mips mips/sibyte
In message: <201002120259.o1c2xopr069...@svn.freebsd.org> Neel Natu writes: : Author: neel : Date: Fri Feb 12 02:59:49 2010 : New Revision: 203796 : URL: http://svn.freebsd.org/changeset/base/203796 : : Log: : Remove the PCI_IOSPACE_SIZE and PCI_IOSPACE_ADDR hack from nexus.c. Implement : this in the Sibyte PCI hostbridge driver instead. : : The nexus driver sees resource allocation requests for memory and irq : resources only. These are legitimate resources on all MIPS platforms. : : Suggested by: imp Thanks. In general, by the time we get to the nexus, there should be only native resources. I/O space is a construct of the PCI bus, or whatever other bus on the system maps it to an address space. Now that we have a real bus-space implementation, we no longer need to pretend there's an I/O space at the nexus to make the bus space functions happy. Bus space now does the proper mapping up the tree, so by the time we get here, only memory space and hard IRQs should be left (which also means that any IRQ fan-in should be mapped by this point too). Warner ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"