svn commit: r279481 - stable/10/usr.sbin/ctld
Author: mav Date: Sun Mar 1 09:28:39 2015 New Revision: 279481 URL: https://svnweb.freebsd.org/changeset/base/279481 Log: MFC r279277: Fix memory leak on incorrect initiator portal. Submitted by: Dmitry Luhtionov Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c == --- stable/10/usr.sbin/ctld/ctld.c Sun Mar 1 07:00:34 2015 (r279480) +++ stable/10/usr.sbin/ctld/ctld.c Sun Mar 1 09:28:39 2015 (r279481) @@ -400,6 +400,7 @@ auth_portal_new(struct auth_group *ag, c return (ap); error: + free(ap); log_errx(1, "Incorrect initiator portal '%s'", portal); return (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: r279482 - stable/10/usr.sbin/ctld
Author: mav Date: Sun Mar 1 09:29:59 2015 New Revision: 279482 URL: https://svnweb.freebsd.org/changeset/base/279482 Log: MFC r279276: Add checks for malloc() failures. Submitted by: Dmitry Luhtionov Modified: stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/kernel.c == --- stable/10/usr.sbin/ctld/kernel.cSun Mar 1 09:28:39 2015 (r279481) +++ stable/10/usr.sbin/ctld/kernel.cSun Mar 1 09:29:59 2015 (r279482) @@ -864,7 +864,10 @@ kernel_port_add(struct port *port) bzero(&req, sizeof(req)); strlcpy(req.driver, "iscsi", sizeof(req.driver)); req.reqtype = CTL_REQ_CREATE; + req.num_args = 5; req.args = malloc(req.num_args * sizeof(*req.args)); + if (req.args == NULL) + log_err(1, "malloc"); n = 0; req.args[n].namelen = sizeof("port_id"); req.args[n].name = __DECONST(char *, "port_id"); @@ -978,6 +981,8 @@ kernel_port_remove(struct port *port) req.reqtype = CTL_REQ_REMOVE; req.num_args = 2; req.args = malloc(req.num_args * sizeof(*req.args)); + if (req.args == NULL) + log_err(1, "malloc"); str_arg(&req.args[0], "cfiscsi_target", targ->t_name); snprintf(tagstr, sizeof(tagstr), "%d", pg->pg_tag); str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); ___ 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: r279483 - head/sys/cddl/dev/dtrace/arm
Author: andrew Date: Sun Mar 1 10:04:14 2015 New Revision: 279483 URL: https://svnweb.freebsd.org/changeset/base/279483 Log: Fix the dtrace ARM atomic compare-and-set functions. These functions are expected to return the data in the memory location pointed at by target after the operation. The FreeBSD atomic functions previously used return either 0 or 1 to indicate if the comparison succeeded or not respectively. With this change these functions only support ARMv6 and later are supported by these functions. Sponsored by: ABT Systems Ltd Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S == --- head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Sun Mar 1 09:29:59 2015 (r279482) +++ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Sun Mar 1 10:04:14 2015 (r279483) @@ -195,3 +195,25 @@ ENTRY(dtrace_caller) mov r0, #-1 RET END(dtrace_caller) + +/* +uint32_t +dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new) + +void * +dtrace_casptr(volatile void *target, volatile void *cmp, volatile void *new) +*/ +ENTRY(dtrace_cas32) +EENTRY(dtrace_casptr) +1: ldrex r3, [r0]/* Load target */ + cmp r3, r1 /* Check if *target == cmp */ + bne 2f /* No, return */ + strex r3, r2, [r0]/* Store new to target */ + cmp r3, #0 /* Did the store succeed? */ + bne 1b /* No, try again */ + mov r0, r2 /* Return the new value of the store */ +2: movne r0, r3 /* The first compare failed, return */ + /* the value loaded from memory */ + RET +EEND(dtrace_casptr) +END(dtrace_cas32) Modified: head/sys/cddl/dev/dtrace/arm/dtrace_isa.c == --- head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Sun Mar 1 09:29:59 2015 (r279482) +++ head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Sun Mar 1 10:04:14 2015 (r279483) @@ -262,34 +262,3 @@ dtrace_fuword64(void *uaddr) } return (dtrace_fuword64_nocheck(uaddr)); } - -#define __with_interrupts_disabled(expr) \ - do {\ - u_int cpsr_save, tmp; \ - \ - __asm __volatile( \ - "mrs %0, cpsr;"\ - "orr %1, %0, %2;" \ - "msr cpsr_fsxc, %1;" \ - : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (PSR_I | PSR_F) \ - : "cc" ); \ - (expr); \ -__asm __volatile( \ - "msr cpsr_fsxc, %0"\ - : /* no output */ \ - : "r" (cpsr_save) \ - : "cc" ); \ - } while(0) - -uint32_t dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new) -{ - return atomic_cmpset_32((uint32_t*)target, (uint32_t)cmp, (uint32_t)new); - -} - -void * dtrace_casptr(volatile void *target, volatile void *cmp, volatile void *new) -{ -return (void*)dtrace_cas32((uint32_t*)target, (uint32_t)cmp, (uint32_t)new); -} - ___ 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: r279484 - stable/10/sys/x86/iommu
Author: kib Date: Sun Mar 1 10:29:48 2015 New Revision: 279484 URL: https://svnweb.freebsd.org/changeset/base/279484 Log: MFC r276867: Fix DMAR context allocations for the devices behind PCIe->PCI bridges after dmar driver was converted to use rids. The bus component to calculate context page must be taken from the requestor rid, which is a bridge, and not from the device bus number. Modified: stable/10/sys/x86/iommu/intel_ctx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_ctx.c == --- stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:04:14 2015 (r279483) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:29:48 2015 (r279484) @@ -290,7 +290,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev * higher chance to succeed if the sleep is allowed. */ DMAR_UNLOCK(dmar); - dmar_ensure_ctx_page(dmar, bus); + dmar_ensure_ctx_page(dmar, PCI_RID2BUS(rid)); ctx1 = dmar_get_ctx_alloc(dmar, rid); if (id_mapped) { ___ 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: r279485 - stable/10/sys/x86/iommu
Author: kib Date: Sun Mar 1 10:35:54 2015 New Revision: 279485 URL: https://svnweb.freebsd.org/changeset/base/279485 Log: MFC r276948: Print rid when announcing DMAR context creation. Print sid when fault occurs. Modified: stable/10/sys/x86/iommu/intel_ctx.c stable/10/sys/x86/iommu/intel_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_ctx.c == --- stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:29:48 2015 (r279484) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:35:54 2015 (r279485) @@ -383,10 +383,10 @@ dmar_get_ctx(struct dmar_unit *dmar, dev LIST_INSERT_HEAD(&dmar->contexts, ctx, link); ctx_id_entry_init(ctx, ctxp); device_printf(dev, - "dmar%d pci%d:%d:%d:%d domain %d mgaw %d " + "dmar%d pci%d:%d:%d:%d rid %x domain %d mgaw %d " "agaw %d %s-mapped\n", dmar->unit, dmar->segment, bus, slot, - func, ctx->domain, ctx->mgaw, ctx->agaw, + func, rid, ctx->domain, ctx->mgaw, ctx->agaw, id_mapped ? "id" : "re"); } else { dmar_ctx_dtr(ctx1, true, true); Modified: stable/10/sys/x86/iommu/intel_fault.c == --- stable/10/sys/x86/iommu/intel_fault.c Sun Mar 1 10:29:48 2015 (r279484) +++ stable/10/sys/x86/iommu/intel_fault.c Sun Mar 1 10:35:54 2015 (r279485) @@ -230,8 +230,9 @@ dmar_fault_task(void *arg, int pending _ } DMAR_UNLOCK(unit); printf( - "pci%d:%d:%d fault acc %x adt 0x%x reason 0x%x addr %jx\n", - bus, slot, func, DMAR_FRCD2_T(fault_rec[1]), + "pci%d:%d:%d sid %x fault acc %x adt 0x%x reason 0x%x " + "addr %jx\n", + bus, slot, func, sid, DMAR_FRCD2_T(fault_rec[1]), DMAR_FRCD2_AT(fault_rec[1]), DMAR_FRCD2_FR(fault_rec[1]), (uintmax_t)fault_rec[0]); DMAR_FAULT_LOCK(unit); ___ 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: r279486 - stable/10/sys/x86/iommu
Author: kib Date: Sun Mar 1 10:39:19 2015 New Revision: 279486 URL: https://svnweb.freebsd.org/changeset/base/279486 Log: MFC r276949: (only to ease merging of r279117). MFC r279117: Revert r276949 and redo the fix for PCIe/PCI bridges, which do not follow specification and do not provide PCIe capability. Modified: stable/10/sys/x86/iommu/busdma_dmar.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/busdma_dmar.c == --- stable/10/sys/x86/iommu/busdma_dmar.c Sun Mar 1 10:35:54 2015 (r279485) +++ stable/10/sys/x86/iommu/busdma_dmar.c Sun Mar 1 10:39:19 2015 (r279486) @@ -96,11 +96,13 @@ static device_t dmar_get_requester(device_t dev, uint16_t *rid) { devclass_t pci_class; - device_t pci, pcib, requester; + device_t l, pci, pcib, pcip, pcibp, requester; int cap_offset; + uint16_t pcie_flags; + bool bridge_is_pcie; pci_class = devclass_find("pci"); - requester = dev; + l = requester = dev; *rid = pci_get_rid(dev); @@ -110,19 +112,17 @@ dmar_get_requester(device_t dev, uint16_ * unit. */ for (;;) { - pci = device_get_parent(dev); - KASSERT(pci != NULL, ("NULL parent for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + pci = device_get_parent(l); + KASSERT(pci != NULL, ("dmar_get_requester(%s): NULL parent " + "for %s", device_get_name(dev), device_get_name(l))); KASSERT(device_get_devclass(pci) == pci_class, - ("Non-pci parent for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + ("dmar_get_requester(%s): non-pci parent %s for %s", + device_get_name(dev), device_get_name(pci), + device_get_name(l))); pcib = device_get_parent(pci); - KASSERT(pcib != NULL, ("NULL bridge for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + KASSERT(pcib != NULL, ("dmar_get_requester(%s): NULL bridge " + "for %s", device_get_name(dev), device_get_name(pci))); /* * The parent of our "bridge" isn't another PCI bus, @@ -130,19 +130,46 @@ dmar_get_requester(device_t dev, uint16_ * port, and the requester ID won't be translated * further. */ - if (device_get_devclass(device_get_parent(pcib)) != pci_class) + pcip = device_get_parent(pcib); + if (device_get_devclass(pcip) != pci_class) break; + pcibp = device_get_parent(pcip); - if (pci_find_cap(dev, PCIY_EXPRESS, &cap_offset) != 0) { + if (pci_find_cap(l, PCIY_EXPRESS, &cap_offset) == 0) { + /* +* Do not stop the loop even if the target +* device is PCIe, because it is possible (but +* unlikely) to have a PCI->PCIe bridge +* somewhere in the hierarchy. +*/ + l = pcib; + } else { /* * Device is not PCIe, it cannot be seen as a -* requester by DMAR unit. +* requester by DMAR unit. Check whether the +* bridge is PCIe. */ + bridge_is_pcie = pci_find_cap(pcib, PCIY_EXPRESS, + &cap_offset) == 0; requester = pcib; - /* Check whether the bus above is PCIe. */ - if (pci_find_cap(pcib, PCIY_EXPRESS, - &cap_offset) == 0) { + /* +* Check for a buggy PCIe/PCI bridge that +* doesn't report the express capability. If +* the bridge above it is express but isn't a +* PCI bridge, then we know pcib is actually a +* PCIe/PCI bridge. +*/ + if (!bridge_is_pcie && pci_find_cap(pcibp, + PCIY_EXPRESS, &cap_offset) == 0) { + pcie_flags = pci_read_config(pcibp, + cap_offset + PCIER_FLAGS, 2); + if ((pcie_flags & PCIEM_FLAGS_TYPE) != + PCIEM_TYPE_PCI_BRIDGE) +
svn commit: r279487 - head/sys/dev/pci
Author: dumbbell Date: Sun Mar 1 12:47:36 2015 New Revision: 279487 URL: https://svnweb.freebsd.org/changeset/base/279487 Log: vgapci: New vga_pci_repost() function This can be used to restore the VGA mode after a KMS driver is unloaded. Differential Revision:https://reviews.freebsd.org/D687 Modified: head/sys/dev/pci/pcivar.h head/sys/dev/pci/vga_pci.c Modified: head/sys/dev/pci/pcivar.h == --- head/sys/dev/pci/pcivar.h Sun Mar 1 10:39:19 2015(r279486) +++ head/sys/dev/pci/pcivar.h Sun Mar 1 12:47:36 2015(r279487) @@ -591,5 +591,6 @@ struct pcicfg_vpd *pci_fetch_vpd_list(de intvga_pci_is_boot_display(device_t dev); void * vga_pci_map_bios(device_t dev, size_t *size); void vga_pci_unmap_bios(device_t dev, void *bios); +intvga_pci_repost(device_t dev); #endif /* _PCIVAR_H_ */ Modified: head/sys/dev/pci/vga_pci.c == --- head/sys/dev/pci/vga_pci.c Sun Mar 1 10:39:19 2015(r279486) +++ head/sys/dev/pci/vga_pci.c Sun Mar 1 12:47:36 2015(r279487) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* To re-POST the card. */ + struct vga_resource { struct resource *vr_res; int vr_refs; @@ -194,6 +196,36 @@ vga_pci_unmap_bios(device_t dev, void *b vr->vr_res); } +int +vga_pci_repost(device_t dev) +{ +#if defined(__amd64__) || defined(__i386__) + x86regs_t regs; + + if (!vga_pci_is_boot_display(dev)) + return (EINVAL); + + if (x86bios_get_orm(VGA_PCI_BIOS_SHADOW_ADDR) == NULL) + return (ENOTSUP); + + x86bios_init_regs(®s); + + regs.R_AH = pci_get_bus(dev); + regs.R_AL = (pci_get_slot(dev) << 3) | (pci_get_function(dev) & 0x07); + regs.R_DL = 0x80; + + device_printf(dev, "REPOSTing\n"); + x86bios_call(®s, X86BIOS_PHYSTOSEG(VGA_PCI_BIOS_SHADOW_ADDR + 3), + X86BIOS_PHYSTOOFF(VGA_PCI_BIOS_SHADOW_ADDR + 3)); + + x86bios_get_intr(0x10); + + return (0); +#else + return (ENOTSUP); +#endif +} + static int vga_pci_probe(device_t dev) { ___ 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: r279488 - in head/sys: dev/drm2 dev/drm2/radeon dev/fb dev/vt dev/vt/hw/fb dev/vt/hw/vga sys
Author: dumbbell Date: Sun Mar 1 12:54:22 2015 New Revision: 279488 URL: https://svnweb.freebsd.org/changeset/base/279488 Log: vt(4): Add support to "downgrade" from eg. vt_fb to vt_vga The main purpose of this feature is to be able to unload a KMS driver. When going back from the current vt(4) backend to the previous backend, the previous backend is reinitialized with the special VDF_DOWNGRADE flag set. Then the current driver is terminated with the new "vd_fini" callback. In the case of vt_fb and vt_vga, this allows the former to pass the vgapci device vt_fb used to vt_vga so the device can be rePOSTed. Differential Revision:https://reviews.freebsd.org/D687 Modified: head/sys/dev/drm2/drm_fb_helper.c head/sys/dev/drm2/radeon/radeon_fb.c head/sys/dev/fb/fbd.c head/sys/dev/vt/hw/fb/vt_fb.c head/sys/dev/vt/hw/fb/vt_fb.h head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c head/sys/sys/fbio.h Modified: head/sys/dev/drm2/drm_fb_helper.c == --- head/sys/dev/drm2/drm_fb_helper.c Sun Mar 1 12:47:36 2015 (r279487) +++ head/sys/dev/drm2/drm_fb_helper.c Sun Mar 1 12:54:22 2015 (r279488) @@ -937,19 +937,21 @@ int drm_fb_helper_single_fb_probe(struct info->fb_priv = sc; info->enter = &vt_kms_postswitch; + kdev = fb_helper->dev->device; + info->fb_video_dev = device_get_parent(kdev); + /* set the fb pointer */ for (i = 0; i < fb_helper->crtc_count; i++) { fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; } if (new_fb) { - device_t fbd; int ret; - kdev = fb_helper->dev->device; - fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); - if (fbd != NULL) - ret = device_probe_and_attach(fbd); + info->fb_fbd_dev = device_add_child(kdev, "fbd", + device_get_unit(kdev)); + if (info->fb_fbd_dev != NULL) + ret = device_probe_and_attach(info->fb_fbd_dev); else ret = ENODEV; #ifdef DEV_VT Modified: head/sys/dev/drm2/radeon/radeon_fb.c == --- head/sys/dev/drm2/radeon/radeon_fb.cSun Mar 1 12:47:36 2015 (r279487) +++ head/sys/dev/drm2/radeon/radeon_fb.cSun Mar 1 12:54:22 2015 (r279488) @@ -291,6 +291,8 @@ static int radeon_fbdev_destroy(struct d if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; + if (info->fb_fbd_dev != NULL) + device_delete_child(dev->device, info->fb_fbd_dev); free(info->fb_priv, DRM_MEM_KMS); free(info, DRM_MEM_KMS); } Modified: head/sys/dev/fb/fbd.c == --- head/sys/dev/fb/fbd.c Sun Mar 1 12:47:36 2015(r279487) +++ head/sys/dev/fb/fbd.c Sun Mar 1 12:54:22 2015(r279488) @@ -263,6 +263,8 @@ fbd_unregister(struct fb_info* info) LIST_FOREACH_SAFE(entry, &fb_list_head, fb_list, tmp) { if (entry->fb_info == info) { LIST_REMOVE(entry, fb_list); + if (LIST_EMPTY(&fb_list_head)) + vt_fb_detach(info); free(entry, M_DEVBUF); return (0); } Modified: head/sys/dev/vt/hw/fb/vt_fb.c == --- head/sys/dev/vt/hw/fb/vt_fb.c Sun Mar 1 12:47:36 2015 (r279487) +++ head/sys/dev/vt/hw/fb/vt_fb.c Sun Mar 1 12:54:22 2015 (r279488) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); static struct vt_driver vt_fb_driver = { .vd_name = "fb", .vd_init = vt_fb_init, + .vd_fini = vt_fb_fini, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, .vd_bitblt_bmp = vt_fb_bitblt_bitmap, @@ -419,6 +420,7 @@ vt_fb_init(struct vt_device *vd) info = vd->vd_softc; vd->vd_height = info->fb_height; vd->vd_width = info->fb_width; + vd->vd_video_dev = info->fb_video_dev; if (info->fb_size == 0) return (CN_DEAD); @@ -442,6 +444,13 @@ vt_fb_init(struct vt_device *vd) return (CN_INTERNAL); } +void +vt_fb_fini(struct vt_device *vd, void *softc) +{ + + vd->vd_video_dev = NULL; +} + int vt_fb_attach(struct fb_info *info) { @@ -451,6 +460,15 @@ vt_fb_attach(struct fb_info *info) return (0); } +int +vt_fb_detach(struct fb_info *info) +{ + + vt_deallocate(&vt_fb_driver, info); + + return (0); +} + void vt_fb_suspend(struct vt_device *vd) { Modified: head/sys/dev/vt/hw/
Re: svn commit: r279487 - head/sys/dev/pci
> On 01 Mar 2015, at 12:47 , Jean-Sebastien Pedron wrote: > > Author: dumbbell > Date: Sun Mar 1 12:47:36 2015 > New Revision: 279487 > URL: https://svnweb.freebsd.org/changeset/base/279487 > > Log: > vgapci: New vga_pci_repost() function > > This can be used to restore the VGA mode after a KMS driver is unloaded. > > Differential Revision: https://reviews.freebsd.org/D687 I think this broke a couple of i386 and pc98 kernel configs: pc98 GENERIC-NODEBUG kernel failed, check _.pc98.GENERIC-NODEBUG for details pc98 GENERIC kernel failed, check _.pc98.GENERIC for details pc98 LINT kernel failed, check _.pc98.LINT for details i386 XBOX kernel failed, check _.i386.XBOX for details i386 XEN kernel failed, check _.i386.XEN for details linking kernel.debug vga_pci.o: In function `vga_pci_repost': /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x591): undefined reference to `x86bios_get_orm' /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x5ac): undefined reference to `x86bios_init_regs' /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x701): undefined reference to `x86bios_call' /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x70d): undefined reference to `x86bios_get_intr' --- kernel.debug --- > > Modified: > head/sys/dev/pci/pcivar.h > head/sys/dev/pci/vga_pci.c > > Modified: head/sys/dev/pci/pcivar.h > == > --- head/sys/dev/pci/pcivar.h Sun Mar 1 10:39:19 2015(r279486) > +++ head/sys/dev/pci/pcivar.h Sun Mar 1 12:47:36 2015(r279487) > @@ -591,5 +591,6 @@ struct pcicfg_vpd *pci_fetch_vpd_list(de > int vga_pci_is_boot_display(device_t dev); > void *vga_pci_map_bios(device_t dev, size_t *size); > void vga_pci_unmap_bios(device_t dev, void *bios); > +int vga_pci_repost(device_t dev); > > #endif /* _PCIVAR_H_ */ > > Modified: head/sys/dev/pci/vga_pci.c > == > --- head/sys/dev/pci/vga_pci.cSun Mar 1 10:39:19 2015 > (r279486) > +++ head/sys/dev/pci/vga_pci.cSun Mar 1 12:47:36 2015 > (r279487) > @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include /* To re-POST the card. */ > + > struct vga_resource { > struct resource *vr_res; > int vr_refs; > @@ -194,6 +196,36 @@ vga_pci_unmap_bios(device_t dev, void *b > vr->vr_res); > } > > +int > +vga_pci_repost(device_t dev) > +{ > +#if defined(__amd64__) || defined(__i386__) > + x86regs_t regs; > + > + if (!vga_pci_is_boot_display(dev)) > + return (EINVAL); > + > + if (x86bios_get_orm(VGA_PCI_BIOS_SHADOW_ADDR) == NULL) > + return (ENOTSUP); > + > + x86bios_init_regs(®s); > + > + regs.R_AH = pci_get_bus(dev); > + regs.R_AL = (pci_get_slot(dev) << 3) | (pci_get_function(dev) & 0x07); > + regs.R_DL = 0x80; > + > + device_printf(dev, "REPOSTing\n"); > + x86bios_call(®s, X86BIOS_PHYSTOSEG(VGA_PCI_BIOS_SHADOW_ADDR + 3), > + X86BIOS_PHYSTOOFF(VGA_PCI_BIOS_SHADOW_ADDR + 3)); > + > + x86bios_get_intr(0x10); > + > + return (0); > +#else > + return (ENOTSUP); > +#endif > +} > + > static int > vga_pci_probe(device_t dev) > { > — Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." ___ 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: r279489 - head/sbin/mount_fusefs
Author: trasz Date: Sun Mar 1 18:26:26 2015 New Revision: 279489 URL: https://svnweb.freebsd.org/changeset/base/279489 Log: Make the "automounted" flag work for FUSE filesystems. PR: 192852 Submitted by: taku at tackymt.homeip.net (earlier version) MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/mount_fusefs/mount_fusefs.c Modified: head/sbin/mount_fusefs/mount_fusefs.c == --- head/sbin/mount_fusefs/mount_fusefs.c Sun Mar 1 12:54:22 2015 (r279488) +++ head/sbin/mount_fusefs/mount_fusefs.c Sun Mar 1 18:26:26 2015 (r279489) @@ -73,6 +73,13 @@ static struct mntopt mopts[] = { { "subtype=",0, ALTF_SUBTYPE, 1 }, #define ALTF_SYNC_UNMOUNT 0x80 { "sync_unmount",0, ALTF_SYNC_UNMOUNT, 1 }, + /* +* MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, does not fit into +* the 'flags' argument to nmount(2). We have to abuse altflags +* to pass it, as string, via iovec. +*/ + #define ALTF_AUTOMOUNTED 0x100 + { "automounted",0, ALTF_AUTOMOUNTED, 1 }, /* Linux specific options, we silently ignore them */ { "fsname=", 0, 0x00, 1 }, { "fd=", 0, 0x00, 1 }, ___ 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: r279487 - head/sys/dev/pci
On 01.03.2015 16:02, Bjoern A. Zeeb wrote: >> Author: dumbbell >> Date: Sun Mar 1 12:47:36 2015 >> New Revision: 279487 >> URL: https://svnweb.freebsd.org/changeset/base/279487 >> >> Log: >> vgapci: New vga_pci_repost() function > > I think this broke a couple of i386 and pc98 kernel configs: I'm sorry, I'm trying to reproduce that right now. Thank you for the heads-up. -- Jean-Sébastien Pédron signature.asc Description: OpenPGP digital signature
svn commit: r279490 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Sun Mar 1 20:22:28 2015 New Revision: 279490 URL: https://svnweb.freebsd.org/changeset/base/279490 Log: Bump the port mask on the AR8327 ethernet switch from 0x3f to 0x7f. So, it turns out that the AR8327 has 7 ports internally: * GMAC0 / external (CPU) MAC0 * GMAC1 / port1 -> GMAC5 / port5: external switch port PHYs * GMAC6 / external (CPU) MAC1 Now, depending upon how things are wired up, the second CPU port (MAC1) can be wired to either the switch (port6), or through port5's PHY, bypassing the GMAC+switch entirely. Ie, it can pretend to be a boring PHY, saving system designers from having to include a separate PHY for a "WAN" port. Here's the rub - the AP135 board (QCA955x SoC) hooks up arge0 to the second CPU port on the AR8327, but it's hooked up as RGMII. So, in order to hook it up to the rest of the switch, it isn't configured as a separate PHY - OpenWRT has it setup as connected via RGMII to GMAC6 and (I'm guessing) it's set to be a WAN port by configuring up port-based VLANs or something. Thus, with a port mask of 0x3f, GMAC6 was never allowed to receive traffic from any other port. It could transmit fine, but not receive anything. So, now it works enough for me to continue doing board bootstrapping. Note, this isn't enough to make the QCA955x + AR8327 work - there's a bunch of uncommitted work to both the platform SoC (interrupt handling, ethernet, etc) and the ethernet switch (register access space, setup, etc) that needs to happen. However, this particular change is also relevant to other SoCs, like the AR934x and AR7161, both of which can be glued to this switch. Tested: * AP135 development board TODO: * Figure out whether I can somehow abuse another port mode to have this be a pass-through PHY, or whether I should just create some more boot time hints to explicitly set up port-based isolation so this works in a more useful way by default. Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c == --- head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Mar 1 18:26:26 2015(r279489) +++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Mar 1 20:22:28 2015(r279490) @@ -683,7 +683,7 @@ ar8327_port_init(struct arswitch_softc * t |= AR8X16_PORT_CTRL_STATE_FORWARD << AR8327_PORT_LOOKUP_STATE_S; /* So this allows traffic to any port except ourselves */ - t |= (0x3f & ~(1 << port)); + t |= (0x7f & ~(1 << port)); arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_LOOKUP(port), t); } @@ -736,7 +736,7 @@ ar8327_reset_vlans(struct arswitch_softc arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_VLAN1(i), t); /* Ports can see other ports */ - t = (0x3f & ~(1 << i)); /* all ports besides us */ + t = (0x7f & ~(1 << i)); /* all ports besides us */ t |= AR8327_PORT_LOOKUP_LEARN; /* in_port_only, forward */ ___ 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: r279491 - head/lib/msun/src
Author: kargl Date: Sun Mar 1 20:26:03 2015 New Revision: 279491 URL: https://svnweb.freebsd.org/changeset/base/279491 Log: When j0() and j1() were converted to j0f() and j1f(), the threshold values for the different invervals were not converted correctly. Adjust the threshold values to values, which should agree with the comments. Reported by: cognet (j1f only) Discussed with: pfg, bde Reviewed by: bde Modified: head/lib/msun/src/e_j0f.c head/lib/msun/src/e_j1f.c Modified: head/lib/msun/src/e_j0f.c == --- head/lib/msun/src/e_j0f.c Sun Mar 1 20:22:28 2015(r279490) +++ head/lib/msun/src/e_j0f.c Sun Mar 1 20:26:03 2015(r279491) @@ -62,7 +62,7 @@ __ieee754_j0f(float x) * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x) * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x) */ - if(ix>0x5400) z = (invsqrtpi*cc)/sqrtf(x); + if(ix>0x5800) z = (invsqrtpi*cc)/sqrtf(x); /* |x|>2**49 */ else { u = pzerof(x); v = qzerof(x); z = invsqrtpi*(u*cc-v*ss)/sqrtf(x); @@ -136,14 +136,14 @@ __ieee754_y0f(float x) if ((s*c)0x5480) z = (invsqrtpi*ss)/sqrtf(x); +if(ix>0x5800) z = (invsqrtpi*ss)/sqrtf(x); /* |x|>2**49 */ else { u = pzerof(x); v = qzerof(x); z = invsqrtpi*(u*ss+v*cc)/sqrtf(x); } return z; } - if(ix<=0x3200) {/* x < 2**-27 */ + if(ix<=0x3900) {/* x < 2**-13 */ return(u00 + tpi*__ieee754_logf(x)); } z = x*x; @@ -232,8 +232,8 @@ static const float pS2[5] = { GET_FLOAT_WORD(ix,x); ix &= 0x7fff; if(ix>=0x4100) {p = pR8; q= pS8;} - else if(ix>=0x40f71c58){p = pR5; q= pS5;} - else if(ix>=0x4036db68){p = pR3; q= pS3;} + else if(ix>=0x409173eb){p = pR5; q= pS5;} + else if(ix>=0x4036d917){p = pR3; q= pS3;} else {p = pR2; q= pS2;} /* ix>=0x4000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]; @@ -327,8 +327,8 @@ static const float qS2[6] = { GET_FLOAT_WORD(ix,x); ix &= 0x7fff; if(ix>=0x4100) {p = qR8; q= qS8;} - else if(ix>=0x40f71c58){p = qR5; q= qS5;} - else if(ix>=0x4036db68){p = qR3; q= qS3;} + else if(ix>=0x409173eb){p = qR5; q= qS5;} + else if(ix>=0x4036d917){p = qR3; q= qS3;} else {p = qR2; q= qS2;} /* ix>=0x4000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]; Modified: head/lib/msun/src/e_j1f.c == --- head/lib/msun/src/e_j1f.c Sun Mar 1 20:22:28 2015(r279490) +++ head/lib/msun/src/e_j1f.c Sun Mar 1 20:26:03 2015(r279491) @@ -63,7 +63,7 @@ __ieee754_j1f(float x) * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x) * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x) */ - if(ix>0x8000) z = (invsqrtpi*cc)/sqrtf(y); + if(ix>0x5800) z = (invsqrtpi*cc)/sqrtf(y); /* |x|>2**49 */ else { u = ponef(y); v = qonef(y); z = invsqrtpi*(u*cc-v*ss)/sqrtf(y); @@ -71,7 +71,7 @@ __ieee754_j1f(float x) if(hx<0) return -z; else return z; } - if(ix<0x3200) { /* |x|<2**-27 */ + if(ix<0x3900) { /* |x|<2**-13 */ if(huge+x>one) return (float)0.5*x;/* inexact if x!=0 necessary */ } z = x*x; @@ -129,14 +129,14 @@ __ieee754_y1f(float x) * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) * to compute the worse one. */ -if(ix>0x4800) z = (invsqrtpi*ss)/sqrtf(x); +if(ix>0x5800) z = (invsqrtpi*ss)/sqrtf(x); /* |x|>2**49 */ else { u = ponef(x); v = qonef(x); z = invsqrtpi*(u*ss+v*cc)/sqrtf(x); } return z; } -if(ix<=0x2480) {/* x < 2**-54 */ +if(ix<=0x3300) {/* x < 2**-25 */ return(-tpi/x); } z = x*x; @@ -227,8 +227,8 @@ static const float ps2[5] = { GET_FLOAT_WORD(ix,x); ix &= 0x7fff; if(ix>=0x4100) {p = pr8; q= ps8;} -else if(ix>=0x40f71c58){p = pr5; q= ps5;} -else if(ix>=0x4036db68){p = pr3; q= ps3;} +else if(ix>=0x409173eb){p = pr5; q= ps5;} +else if(ix>=0x4036d917){p = pr3; q= ps3;} else {p = pr2; q= ps2;} /* ix>=0x4000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*
svn commit: r279492 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Sun Mar 1 20:32:35 2015 New Revision: 279492 URL: https://svnweb.freebsd.org/changeset/base/279492 Log: AR8327: Disable energy-efficient ethernet support in the PHYs. I noticed that openwrt/linux does this, citing "instability", so until they figure out why I'm going to disable it here as well. Tested: * QCA AP135 - QCA955x SoC + AR8327 switch. Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c == --- head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Mar 1 20:26:03 2015(r279491) +++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Mar 1 20:32:35 2015(r279492) @@ -66,7 +66,11 @@ static void ar8327_phy_fixup(struct arswitch_softc *sc, int phy) { - + if (bootverbose) + device_printf(sc->sc_dev, + "%s: called; phy=%d; chiprev=%d\n", __func__, + phy, + sc->chip_rev); switch (sc->chip_rev) { case 1: /* For 100M waveform */ @@ -385,23 +389,23 @@ ar8327_fetch_pdata_pad(struct arswitch_s sbuf, &val) == 0) pc->pipe_rxclk_sel = val; -#if 0 - device_printf(sc->sc_dev, - "%s: pad %d: mode=%d, rxclk_sel=%d, txclk_sel=%d, " - "txclk_delay_sel=%d, rxclk_delay_sel=%d, txclk_delay_en=%d, " - "rxclk_enable_en=%d, sgmii_delay_en=%d, pipe_rxclk_sel=%d\n", - __func__, - pad, - pc->mode, - pc->rxclk_sel, - pc->txclk_sel, - pc->txclk_delay_sel, - pc->rxclk_delay_sel, - pc->txclk_delay_en, - pc->rxclk_delay_en, - pc->sgmii_delay_en, - pc->pipe_rxclk_sel); -#endif + if (bootverbose) { + device_printf(sc->sc_dev, + "%s: pad %d: mode=%d, rxclk_sel=%d, txclk_sel=%d, " + "txclk_delay_sel=%d, rxclk_delay_sel=%d, txclk_delay_en=%d, " + "rxclk_enable_en=%d, sgmii_delay_en=%d, pipe_rxclk_sel=%d\n", + __func__, + pad, + pc->mode, + pc->rxclk_sel, + pc->txclk_sel, + pc->txclk_delay_sel, + pc->rxclk_delay_sel, + pc->txclk_delay_en, + pc->rxclk_delay_en, + pc->sgmii_delay_en, + pc->pipe_rxclk_sel); + } return (1); } @@ -637,6 +641,15 @@ ar8327_hw_global_setup(struct arswitch_s arswitch_modifyreg(sc->sc_dev, AR8327_REG_MODULE_EN, AR8327_MODULE_EN_MIB, AR8327_MODULE_EN_MIB); + /* Disable EEE on all ports due to stability issues */ + t = arswitch_readreg(sc->sc_dev, AR8327_REG_EEE_CTRL); + t |= AR8327_EEE_CTRL_DISABLE_PHY(0) | + AR8327_EEE_CTRL_DISABLE_PHY(1) | + AR8327_EEE_CTRL_DISABLE_PHY(2) | + AR8327_EEE_CTRL_DISABLE_PHY(3) | + AR8327_EEE_CTRL_DISABLE_PHY(4); + arswitch_writereg(sc->sc_dev, AR8327_REG_EEE_CTRL, t); + /* Set the right number of ports */ sc->info.es_nports = 6; ___ 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: r279493 - head/lib/msun/src
Author: kargl Date: Sun Mar 1 20:32:47 2015 New Revision: 279493 URL: https://svnweb.freebsd.org/changeset/base/279493 Log: Give compilers a stronger hint to inline the functions pzero[f], qzero[f], pone[f], and qone[f]. While here fix the function declarations in accordance with style(9). Modified: head/lib/msun/src/e_j0.c head/lib/msun/src/e_j0f.c head/lib/msun/src/e_j1.c head/lib/msun/src/e_j1f.c Modified: head/lib/msun/src/e_j0.c == --- head/lib/msun/src/e_j0.cSun Mar 1 20:32:35 2015(r279492) +++ head/lib/msun/src/e_j0.cSun Mar 1 20:32:47 2015(r279493) @@ -268,7 +268,8 @@ static const double pS2[5] = { 1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */ }; - static double pzero(double x) +static __inline double +pzero(double x) { const double *p,*q; double z,r,s; @@ -363,7 +364,8 @@ static const double qS2[6] = { -5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */ }; - static double qzero(double x) +static __inline double +qzero(double x) { const double *p,*q; double s,r,z; Modified: head/lib/msun/src/e_j0f.c == --- head/lib/msun/src/e_j0f.c Sun Mar 1 20:32:35 2015(r279492) +++ head/lib/msun/src/e_j0f.c Sun Mar 1 20:32:47 2015(r279493) @@ -224,7 +224,8 @@ static const float pS2[5] = { 1.4657617569e+01, /* 0x416a859a */ }; - static float pzerof(float x) +static __inline float +pzerof(float x) { const float *p,*q; float z,r,s; @@ -319,7 +320,8 @@ static const float qS2[6] = { -5.3109550476e+00, /* 0xc0a9f358 */ }; - static float qzerof(float x) +static __inline float +qzerof(float x) { const float *p,*q; float s,r,z; Modified: head/lib/msun/src/e_j1.c == --- head/lib/msun/src/e_j1.cSun Mar 1 20:32:35 2015(r279492) +++ head/lib/msun/src/e_j1.cSun Mar 1 20:32:47 2015(r279493) @@ -262,7 +262,8 @@ static const double ps2[5] = { 8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */ }; - static double pone(double x) +static __inline double +pone(double x) { const double *p,*q; double z,r,s; @@ -358,7 +359,8 @@ static const double qs2[6] = { -4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */ }; - static double qone(double x) +static __inline double +qone(double x) { const double *p,*q; double s,r,z; Modified: head/lib/msun/src/e_j1f.c == --- head/lib/msun/src/e_j1f.c Sun Mar 1 20:32:35 2015(r279492) +++ head/lib/msun/src/e_j1f.c Sun Mar 1 20:32:47 2015(r279493) @@ -219,7 +219,8 @@ static const float ps2[5] = { 8.3646392822e+00, /* 0x4105d590 */ }; - static float ponef(float x) +static __inline float +ponef(float x) { const float *p,*q; float z,r,s; @@ -315,7 +316,8 @@ static const float qs2[6] = { -4.9594988823e+00, /* 0xc09eb437 */ }; - static float qonef(float x) +static __inline float +qonef(float x) { const float *p,*q; float s,r,z; ___ 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: r279494 - in head/sys: conf dev/pci
Author: dumbbell Date: Sun Mar 1 20:54:29 2015 New Revision: 279494 URL: https://svnweb.freebsd.org/changeset/base/279494 Log: Record the dependency to x86bios in vga_pci This fixes the build of XEN and XBOX kernels on i386, which was broken in r279487. While here, do not build vga_pci_repost() on PC98. Reported by: bz@ Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/pci/vga_pci.c Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Sun Mar 1 20:32:47 2015(r279493) +++ head/sys/conf/files.amd64 Sun Mar 1 20:54:29 2015(r279494) @@ -513,10 +513,10 @@ compat/ndis/winx64_wrap.S optionalndisa libkern/memmove.c standard libkern/memset.c standard # -# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa +# x86 real mode BIOS emulator, required by atkbdc/dpms/pci/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa -contrib/x86emu/x86emu.coptional x86bios | atkbd | dpms | vesa +compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | pci | vesa +contrib/x86emu/x86emu.coptional x86bios | atkbd | dpms | pci | vesa # # bvm console # Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Sun Mar 1 20:32:47 2015(r279493) +++ head/sys/conf/files.i386Sun Mar 1 20:54:29 2015(r279494) @@ -531,9 +531,9 @@ i386/xbox/xboxfb.c optional xboxfb dev/fb/boot_font.c optional xboxfb i386/xbox/pic16l.s optional xbox # -# x86 real mode BIOS support, required by atkbdc/dpms/vesa +# x86 real mode BIOS support, required by atkbdc/dpms/pci/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa +compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | pci | vesa # # bvm console # Modified: head/sys/dev/pci/vga_pci.c == --- head/sys/dev/pci/vga_pci.c Sun Mar 1 20:32:47 2015(r279493) +++ head/sys/dev/pci/vga_pci.c Sun Mar 1 20:54:29 2015(r279494) @@ -199,7 +199,7 @@ vga_pci_unmap_bios(device_t dev, void *b int vga_pci_repost(device_t dev) { -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) x86regs_t regs; if (!vga_pci_is_boot_display(dev)) @@ -633,3 +633,4 @@ static driver_t vga_pci_driver = { static devclass_t vga_devclass; DRIVER_MODULE(vgapci, pci, vga_pci_driver, vga_devclass, 0, 0); +MODULE_DEPEND(vgapci, x86bios, 1, 1, 1); ___ 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: r279495 - stable/10/sys/kern
Author: ngie Date: Sun Mar 1 21:03:34 2015 New Revision: 279495 URL: https://svnweb.freebsd.org/changeset/base/279495 Log: MFC r278891: Add the mnt_lockref field to the ddb(4) 'show mount' command Differential Revision: https://reviews.freebsd.org/D1688 Submitted by: Conrad Meyer Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c == --- stable/10/sys/kern/vfs_subr.c Sun Mar 1 20:54:29 2015 (r279494) +++ stable/10/sys/kern/vfs_subr.c Sun Mar 1 21:03:34 2015 (r279495) @@ -3182,6 +3182,7 @@ DB_SHOW_COMMAND(mount, db_show_mount) db_printf("mnt_maxsymlinklen = %d\n", mp->mnt_maxsymlinklen); db_printf("mnt_iosize_max = %d\n", mp->mnt_iosize_max); db_printf("mnt_hashseed = %u\n", mp->mnt_hashseed); + db_printf("mnt_lockref = %d\n", mp->mnt_lockref); db_printf("mnt_secondary_writes = %d\n", mp->mnt_secondary_writes); db_printf("mnt_secondary_accwrites = %d\n", mp->mnt_secondary_accwrites); ___ 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: r279496 - head/sys/powerpc/powerpc
Author: nwhitehorn Date: Sun Mar 1 21:20:18 2015 New Revision: 279496 URL: https://svnweb.freebsd.org/changeset/base/279496 Log: Merge r278429 from ppc64: Fix an extremely subtle concurrency bug triggered by running on 32-thread POWER8 systems. During thread switch, there was a very small window when the stack pointer was set to the stack pointer of the outgoing thread, but after the lock on that thread had already been released. If, during that window, the outgoing thread were rescheduled on another CPU and begin execution and an exception were taken on the original CPU, the trap handler and the outgoing thread would simultaneously execute on the same stack, causing memory corruption. Fix this by making sure to release the old thread only after cpu_switch() is done with its stack. MFC after:2 weeks Modified: head/sys/powerpc/powerpc/swtch32.S Modified: head/sys/powerpc/powerpc/swtch32.S == --- head/sys/powerpc/powerpc/swtch32.S Sun Mar 1 21:03:34 2015 (r279495) +++ head/sys/powerpc/powerpc/swtch32.S Sun Mar 1 21:20:18 2015 (r279496) @@ -71,6 +71,8 @@ */ ENTRY(cpu_throw) mr %r2, %r4 + li %r14,0 /* Tell cpu_switchin not to release a thread */ + b cpu_switchin /* @@ -119,7 +121,6 @@ ENTRY(cpu_switch) bl pmap_deactivate /* Deactivate the current pmap */ sync/* Make sure all of that finished */ - stw %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ cpu_switchin: #if defined(SMP) && defined(SCHED_ULE) @@ -133,7 +134,15 @@ blocked_loop: isync #endif - mfsprg %r7,0 /* Get the pcpu pointer */ + lwz %r17,TD_PCB(%r2)/* Get new current PCB */ + lwz %r1,PCB_SP(%r17)/* Load new stack pointer */ + + /* Release old thread now that we have a stack pointer set up */ + cmpwi %r14,0 + beq-1f + stw %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ + +1: mfsprg %r7,0 /* Get the pcpu pointer */ stw %r2,PC_CURTHREAD(%r7) /* Store new current thread */ lwz %r17,TD_PCB(%r2)/* Store new current PCB */ stw %r17,PC_CURPCB(%r7) ___ 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: r279498 - head/sys/powerpc/booke
Author: nwhitehorn Date: Sun Mar 1 21:23:23 2015 New Revision: 279498 URL: https://svnweb.freebsd.org/changeset/base/279498 Log: Initialize NX stack capabilities and direct map status in pmap like on AIM. Modified: head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/machdep.c == --- head/sys/powerpc/booke/machdep.cSun Mar 1 21:22:34 2015 (r279497) +++ head/sys/powerpc/booke/machdep.cSun Mar 1 21:23:23 2015 (r279498) @@ -226,9 +226,6 @@ cpu_booke_startup(void *dummy) /* Set up buffers, so they can be used to read disk labels. */ bufinit(); vm_pager_bufferinit(); - - /* Cpu supports execution permissions on the pages. */ - elf32_nxstack = 1; } static char * @@ -454,7 +451,6 @@ booke_init(uint32_t arg1, uint32_t arg2) /* Initialise virtual memory. */ pmap_mmu_install(MMU_TYPE_BOOKE, 0); pmap_bootstrap((uintptr_t)kernel_text, end); - pmap_bootstrapped = 1; debugf("MSR = 0x%08x\n", mfmsr()); #if defined(BOOKE_E500) //tlb1_print_entries(); Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c Sun Mar 1 21:22:34 2015 (r279497) +++ head/sys/powerpc/booke/pmap.c Sun Mar 1 21:23:23 2015 (r279498) @@ -1014,6 +1014,10 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset debugf("mmu_booke_bootstrap: entered\n"); + /* Set interesting system properties */ + hw_direct_map = 0; + elf32_nxstack = 1; + /* Initialize invalidation mutex */ mtx_init(&tlbivax_mutex, "tlbivax", NULL, MTX_SPIN); @@ -1315,6 +1319,8 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset kstack0 += PAGE_SIZE; kstack0_phys += PAGE_SIZE; } + + pmap_bootstrapped = 1; debugf("virtual_avail = %08x\n", virtual_avail); debugf("virtual_end = %08x\n", virtual_end); ___ 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: r279497 - stable/10/etc/rc.d
Author: ngie Date: Sun Mar 1 21:22:34 2015 New Revision: 279497 URL: https://svnweb.freebsd.org/changeset/base/279497 Log: Unbreak rcorUnbreak rcorder when MK_UTX == no by moving utx from REQUIRE: in LOGIN to BEFORE: in utx Modified: stable/10/etc/rc.d/LOGIN stable/10/etc/rc.d/utx Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/LOGIN == --- stable/10/etc/rc.d/LOGINSun Mar 1 21:20:18 2015(r279496) +++ stable/10/etc/rc.d/LOGINSun Mar 1 21:22:34 2015(r279497) @@ -4,7 +4,7 @@ # # PROVIDE: LOGIN -# REQUIRE: DAEMON utx +# REQUIRE: DAEMON # This is a dummy dependency to ensure user services such as xdm, # inetd, cron and kerberos are started after everything else, in case Modified: stable/10/etc/rc.d/utx == --- stable/10/etc/rc.d/utx Sun Mar 1 21:20:18 2015(r279496) +++ stable/10/etc/rc.d/utx Sun Mar 1 21:22:34 2015(r279497) @@ -5,6 +5,7 @@ # PROVIDE: utx # REQUIRE: DAEMON FILESYSTEMS +# BEFORE: LOGIN # KEYWORD: shutdown . /etc/rc.subr ___ 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: r279499 - stable/10/etc/rc.d
Author: ngie Date: Sun Mar 1 21:24:19 2015 New Revision: 279499 URL: https://svnweb.freebsd.org/changeset/base/279499 Log: MFC r278704: Unbreak rcorder when MK_UNBOUND == no by moving local_unbound from REQUIRE: in NETWORKING to BEFORE: in the script Modified: stable/10/etc/rc.d/NETWORKING stable/10/etc/rc.d/local_unbound Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/NETWORKING == --- stable/10/etc/rc.d/NETWORKING Sun Mar 1 21:23:23 2015 (r279498) +++ stable/10/etc/rc.d/NETWORKING Sun Mar 1 21:24:19 2015 (r279499) @@ -6,7 +6,7 @@ # PROVIDE: NETWORKING NETWORK # REQUIRE: netif netoptions routing ppp ipfw stf faith # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge -# REQUIRE: static_arp static_ndp local_unbound +# REQUIRE: static_arp static_ndp # This is a dummy dependency, for services which require networking # to be operational before starting. Modified: stable/10/etc/rc.d/local_unbound == --- stable/10/etc/rc.d/local_unboundSun Mar 1 21:23:23 2015 (r279498) +++ stable/10/etc/rc.d/local_unboundSun Mar 1 21:24:19 2015 (r279499) @@ -5,6 +5,7 @@ # PROVIDE: local_unbound # REQUIRE: FILESYSTEMS netif resolv +# BEFORE: NETWORKING # KEYWORD: shutdown . /etc/rc.subr ___ 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: r279501 - head/sys/dev/pci
Author: imp Date: Sun Mar 1 21:41:35 2015 New Revision: 279501 URL: https://svnweb.freebsd.org/changeset/base/279501 Log: Don't leak 'used' in a few error cases. Reported by: Maxime Villard Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Sun Mar 1 21:41:33 2015(r279500) +++ head/sys/dev/pci/pci.c Sun Mar 1 21:41:35 2015(r279501) @@ -1702,12 +1702,16 @@ pci_remap_msix_method(device_t dev, devi for (i = 0; i < msix->msix_table_len; i++) { if (msix->msix_table[i].mte_vector == 0) continue; - if (msix->msix_table[i].mte_handlers > 0) + if (msix->msix_table[i].mte_handlers > 0) { + free(used, M_DEVBUF); return (EBUSY); + } rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, i + 1); KASSERT(rle != NULL, ("missing resource")); - if (rle->res != NULL) + if (rle->res != NULL) { + free(used, M_DEVBUF); return (EBUSY); + } } /* Free the existing resource list entries. */ ___ 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: r279500 - head/sys/dev/ed
Author: imp Date: Sun Mar 1 21:41:33 2015 New Revision: 279500 URL: https://svnweb.freebsd.org/changeset/base/279500 Log: Unlock the main lock before returning rather than after to eliminate dead code that shouldn't have been dead. Reported by: Maxime Villard Modified: head/sys/dev/ed/if_ed_pccard.c Modified: head/sys/dev/ed/if_ed_pccard.c == --- head/sys/dev/ed/if_ed_pccard.c Sun Mar 1 21:24:19 2015 (r279499) +++ head/sys/dev/ed/if_ed_pccard.c Sun Mar 1 21:41:33 2015 (r279500) @@ -1172,8 +1172,8 @@ ed_ifmedia_sts(struct ifnet *ifp, struct sc = ifp->if_softc; ED_LOCK(sc); if (sc->miibus == NULL) { - return; ED_UNLOCK(sc); + return; } mii = device_get_softc(sc->miibus); ___ 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: r279502 - head/sys/fs/nandfs
Author: imp Date: Sun Mar 1 21:41:37 2015 New Revision: 279502 URL: https://svnweb.freebsd.org/changeset/base/279502 Log: nandfs_meta_bread() calls bread() which can set bp to NULL in some error cases. Calling brelse() with a NULL pointer is not allowed, so only call brelse() when the bp is non-NULL. Reported by: Maxime Villard (reported as uninitialized variable) Modified: head/sys/fs/nandfs/bmap.c Modified: head/sys/fs/nandfs/bmap.c == --- head/sys/fs/nandfs/bmap.c Sun Mar 1 21:41:35 2015(r279501) +++ head/sys/fs/nandfs/bmap.c Sun Mar 1 21:41:37 2015(r279502) @@ -317,7 +317,8 @@ bmap_truncate_indirect(struct nandfs_nod error = nandfs_bread_meta(node, lbn, NOCRED, 0, &bp); if (error) { - brelse(bp); + if (bp != NULL) + brelse(bp); return (error); } ___ 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: r279503 - in head: bin/kill bin/sh bin/sh/bltin usr.bin/printf
Author: jilles Date: Sun Mar 1 21:46:55 2015 New Revision: 279503 URL: https://svnweb.freebsd.org/changeset/base/279503 Log: sh: Fix compiler warnings related to duplicate or missing declarations. Modified: head/bin/kill/kill.c head/bin/sh/arith_yacc.h head/bin/sh/arith_yylex.c head/bin/sh/bltin/bltin.h head/bin/sh/mktokens head/bin/sh/options.h head/usr.bin/printf/printf.c Modified: head/bin/kill/kill.c == --- head/bin/kill/kill.cSun Mar 1 21:41:37 2015(r279502) +++ head/bin/kill/kill.cSun Mar 1 21:46:55 2015(r279503) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #ifdef SHELL #define main killcmd #include "bltin/bltin.h" -#include "error.h" #endif static void nosig(const char *); Modified: head/bin/sh/arith_yacc.h == --- head/bin/sh/arith_yacc.hSun Mar 1 21:41:37 2015(r279502) +++ head/bin/sh/arith_yacc.hSun Mar 1 21:46:55 2015(r279503) @@ -81,6 +81,8 @@ #define ARITH_QMARK 37 #define ARITH_COLON 38 +extern const char *arith_buf; + union yystype { arith_t val; char *name; Modified: head/bin/sh/arith_yylex.c == --- head/bin/sh/arith_yylex.c Sun Mar 1 21:41:37 2015(r279502) +++ head/bin/sh/arith_yylex.c Sun Mar 1 21:46:55 2015(r279503) @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #error Arithmetic tokens are out of order. #endif -extern const char *arith_buf; - int yylex(void) { Modified: head/bin/sh/bltin/bltin.h == --- head/bin/sh/bltin/bltin.h Sun Mar 1 21:41:37 2015(r279502) +++ head/bin/sh/bltin/bltin.h Sun Mar 1 21:46:55 2015(r279503) @@ -42,6 +42,7 @@ #include "../shell.h" #include "../mystring.h" #ifdef SHELL +#include "../error.h" #include "../output.h" #include "builtins.h" #define FILE struct output @@ -73,7 +74,6 @@ #include pointer stalloc(int); -void error(const char *, ...) __printf0like(1, 2); int killjob(const char *, int); extern char *commandname; Modified: head/bin/sh/mktokens == --- head/bin/sh/mktokensSun Mar 1 21:41:37 2015(r279502) +++ head/bin/sh/mktokensSun Mar 1 21:46:55 2015(r279503) @@ -74,11 +74,11 @@ exec > token.h awk '{print "#define " $1 " " NR-1}' $temp echo ' /* Array indicating which tokens mark the end of a list */ -const char tokendlist[] = {' +static const char tokendlist[] = {' awk '{print "\t" $2 ","}' $temp echo '}; -const char *const tokname[] = {' +static const char *const tokname[] = {' sed -e 's/"/\\"/g' \ -e 's/[^]*[ ][ ]*[^]*[ ][ ]*\(.*\)/ "\1",/' \ $temp Modified: head/bin/sh/options.h == --- head/bin/sh/options.h Sun Mar 1 21:41:37 2015(r279502) +++ head/bin/sh/options.h Sun Mar 1 21:46:55 2015(r279503) @@ -73,6 +73,7 @@ struct optent { char val; }; +extern struct optent optlist[NOPTS]; #ifdef DEFINE_OPTIONS struct optent optlist[NOPTS] = { { "errexit",'e',0 }, @@ -95,8 +96,6 @@ struct optent optlist[NOPTS] = { { "physical", 'P',0 }, { "trackall", 'h',0 }, }; -#else -extern struct optent optlist[NOPTS]; #endif Modified: head/usr.bin/printf/printf.c == --- head/usr.bin/printf/printf.cSun Mar 1 21:41:37 2015 (r279502) +++ head/usr.bin/printf/printf.cSun Mar 1 21:46:55 2015 (r279503) @@ -66,7 +66,6 @@ static const char rcsid[] = #ifdef SHELL #definemain printfcmd #include "bltin/bltin.h" -#include "error.h" #include "options.h" #endif ___ 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: r279504 - head/sys/powerpc/booke
Author: nwhitehorn Date: Sun Mar 1 21:47:38 2015 New Revision: 279504 URL: https://svnweb.freebsd.org/changeset/base/279504 Log: Missed local diff. Modified: head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/machdep.c == --- head/sys/powerpc/booke/machdep.cSun Mar 1 21:46:55 2015 (r279503) +++ head/sys/powerpc/booke/machdep.cSun Mar 1 21:47:38 2015 (r279504) @@ -188,8 +188,6 @@ void print_kernel_section_addr(void); void print_kenv(void); u_int booke_init(uint32_t, uint32_t); -extern int elf32_nxstack; - static void cpu_booke_startup(void *dummy) { Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c Sun Mar 1 21:46:55 2015 (r279503) +++ head/sys/powerpc/booke/pmap.c Sun Mar 1 21:47:38 2015 (r279504) @@ -160,6 +160,7 @@ unsigned int kernel_ptbls; /* Number of ((pmap) != kernel_pmap && (pmap)->pm_stats.resident_count == 0) extern void tid_flush(tlbtid_t); +extern int elf32_nxstack; /**/ /* TLB and TID handling */ ___ 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: r279505 - in stable/10: etc libexec share/mk tools/build/options usr.bin usr.sbin
Author: ngie Date: Sun Mar 1 22:03:52 2015 New Revision: 279505 URL: https://svnweb.freebsd.org/changeset/base/279505 Log: MFC r278192: Add the following options to enable/disable several features in the base system WITHOUT_BOOTPARAMD - bootparamd WITHOUT_BOOTPD - bootpd WITHOUT_FINGER - finger, fingerd WITHOUT_FTP - ftp, ftpd WITHOUT_INETD - inetd WITHOUT_RBOOTD - rbootd WITHOUT_TCP_WRAPPERS - tcpd, et al WITHOUT_TFTP - tftp, tftp-server WITHOUT_TIMED - timed Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_BOOTPARAMD - copied unchanged from r278192, head/tools/build/options/WITHOUT_BOOTPARAMD stable/10/tools/build/options/WITHOUT_BOOTPD - copied unchanged from r278192, head/tools/build/options/WITHOUT_BOOTPD stable/10/tools/build/options/WITHOUT_FINGER - copied unchanged from r278192, head/tools/build/options/WITHOUT_FINGER stable/10/tools/build/options/WITHOUT_FTP - copied unchanged from r278192, head/tools/build/options/WITHOUT_FTP stable/10/tools/build/options/WITHOUT_INETD - copied unchanged from r278192, head/tools/build/options/WITHOUT_INETD stable/10/tools/build/options/WITHOUT_RBOOTD - copied unchanged from r278192, head/tools/build/options/WITHOUT_RBOOTD stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS - copied unchanged from r278192, head/tools/build/options/WITHOUT_TCP_WRAPPERS stable/10/tools/build/options/WITHOUT_TFTP - copied unchanged from r278192, head/tools/build/options/WITHOUT_TFTP stable/10/tools/build/options/WITHOUT_TIMED - copied unchanged from r278192, head/tools/build/options/WITHOUT_TIMED Modified: stable/10/etc/Makefile stable/10/libexec/Makefile stable/10/share/mk/bsd.own.mk stable/10/usr.bin/Makefile stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile == --- stable/10/etc/Makefile Sun Mar 1 21:47:38 2015(r279504) +++ stable/10/etc/Makefile Sun Mar 1 22:03:52 2015(r279505) @@ -21,13 +21,11 @@ BIN1= crontab \ dhclient.conf \ disktab \ fbtab \ - ftpusers \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ - inetd.conf \ libalias.conf \ libmap.conf \ login.access \ @@ -101,6 +99,14 @@ BIN1+= snmpd.config BIN1+= freebsd-update.conf .endif +.if ${MK_FTP} != "no" +BIN1+= ftpusers +.endif + +.if ${MK_INETD} != "no" +BIN1+= inetd.conf +.endif + .if ${MK_LOCATE} != "no" BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc .endif Modified: stable/10/libexec/Makefile == --- stable/10/libexec/Makefile Sun Mar 1 21:47:38 2015(r279504) +++ stable/10/libexec/Makefile Sun Mar 1 22:03:52 2015(r279505) @@ -5,16 +5,12 @@ SUBDIR=${_atf} \ ${_atrun} \ - bootpd \ ${_comsat} \ - fingerd \ - ftpd \ getty \ ${_hyperv} \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ - rbootd \ revnetgroup \ ${_rlogind} \ rpc.rquotad \ @@ -26,10 +22,8 @@ SUBDIR= ${_atf} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - tcpd \ ${_telnetd} \ ${_tests} \ - tftpd \ ${_tftp-proxy} \ ulog-helper \ ${_ypxfr} @@ -38,6 +32,18 @@ SUBDIR= ${_atf} \ _atrun=atrun .endif +.if ${MK_BOOTPD} != "no" +SUBDIR+= bootpd +.endif + +.if ${MK_FINGER} != "no" +SUBDIR+= fingerd +.endif + +.if ${MK_FTP} != "no" +SUBDIR+= ftpd +.endif + .if ${MK_MAIL} != "no" _comsat= comsat .endif @@ -63,6 +69,10 @@ _tftp-proxy= tftp-proxy _rtld-elf= rtld-elf .endif +.if ${MK_RBOOTD} != "no" +SUBDIR+= rbootd +.endif + .if ${MK_RCMDS} != "no" _rlogind= rlogind _rshd= rshd @@ -77,10 +87,18 @@ _smrsh= smrsh SUBDIR+= talkd .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftpd +.endif + .if ${MK_TESTS} != "no" _atf= atf _tests=tests Modified: stable/10/share/mk/bsd.own.mk == --- stable/10/share/mk/bsd.own.mk Sun Mar 1 21:47:38 2015 (r279504) +++ stable/10/share/mk/bsd.own.mk Sun Mar 1 22:03:52 2015 (r279505) @@ -260,6 +260,8 @@ __DEFAULT_YES_OPTIONS = \ BLUETOOTH \ BMAKE \ BOOT \ +BOOTPARAMD \ +BOOTPD \ BSD_CPIO \ BSDINSTALL \ BSNMP \ @@ -278,12 +280,14 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EE \ EXAMPLES \ +FINGER \ FLOPPY \ FMTREE \
svn commit: r279506 - in stable/10: lib share/mk tools/build/options usr.bin
Author: ngie Date: Sun Mar 1 22:07:54 2015 New Revision: 279506 URL: https://svnweb.freebsd.org/changeset/base/279506 Log: MFC r278193: Add MK_FILE to control whether or not to build file(1), libmagic(3), etc Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_FILE - copied unchanged from r278193, head/tools/build/options/WITHOUT_FILE Modified: stable/10/lib/Makefile stable/10/share/mk/bsd.own.mk stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile == --- stable/10/lib/Makefile Sun Mar 1 22:03:52 2015(r279505) +++ stable/10/lib/Makefile Sun Mar 1 22:07:54 2015(r279506) @@ -59,7 +59,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libkvm \ ${_libldns} \ liblzma \ - libmagic \ + ${_libmagic} \ libmandoc \ libmemstat \ libmd \ @@ -171,6 +171,10 @@ _libbsnmp= libbsnmp _clang=clang .endif +.if ${MK_FILE} != "no" +_libmagic= libmagic +.endif + .if ${MK_GPIB} != "no" _libgpib= libgpib .endif Modified: stable/10/share/mk/bsd.own.mk == --- stable/10/share/mk/bsd.own.mk Sun Mar 1 22:03:52 2015 (r279505) +++ stable/10/share/mk/bsd.own.mk Sun Mar 1 22:07:54 2015 (r279506) @@ -280,6 +280,7 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EE \ EXAMPLES \ +FILE \ FINGER \ FLOPPY \ FMTREE \ Copied: stable/10/tools/build/options/WITHOUT_FILE (from r278193, head/tools/build/options/WITHOUT_FILE) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_FILE Sun Mar 1 22:07:54 2015 (r279506, copy of r278193, head/tools/build/options/WITHOUT_FILE) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr file 1 +and related programs. Modified: stable/10/usr.bin/Makefile == --- stable/10/usr.bin/Makefile Sun Mar 1 22:03:52 2015(r279505) +++ stable/10/usr.bin/Makefile Sun Mar 1 22:07:54 2015(r279506) @@ -45,7 +45,6 @@ SUBDIR= alias \ expand \ false \ fetch \ - file \ find \ fmt \ fold \ @@ -230,6 +229,10 @@ _clang=clang SUBDIR+= ee .endif +.if ${MK_FILE} != "no" +SUBDIR+= file +.endif + .if ${MK_FINGER} != "no" SUBDIR+= finger .endif ___ 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: r279507 - stable/10/share/man/man5
Author: ngie Date: Sun Mar 1 22:12:24 2015 New Revision: 279507 URL: https://svnweb.freebsd.org/changeset/base/279507 Log: Regen src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 == --- stable/10/share/man/man5/src.conf.5 Sun Mar 1 22:07:54 2015 (r279506) +++ stable/10/share/man/man5/src.conf.5 Sun Mar 1 22:12:24 2015 (r279507) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des +.\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd February 13, 2015 +.Dd March 1, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -159,6 +159,14 @@ This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BOOTPARAMD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOTPARAMD 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr bootparamd 8 . +.It Va WITHOUT_BOOTPD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOTPD 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSDINSTALL 278713 2015-02-13 21:24:32Z ngie Set to not build @@ -388,6 +396,17 @@ This includes the device tree compiler ( .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. +.It Va WITHOUT_FILE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FILE 279506 2015-03-01 22:07:54Z ngie +Set to not build +.Xr file 1 +and related programs. +.It Va WITHOUT_FINGER +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FINGER 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr finger 1 +and +.Xr fingerd 8 . .It Va WITHOUT_FLOPPY .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs @@ -414,6 +433,12 @@ without floating-point support. .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . +.It Va WITHOUT_FTP +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FTP 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr ftp 1 +and +.Xr ftpd 8 . .It Va WITHOUT_GAMES .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. @@ -540,6 +565,10 @@ When set, it also enforces the following .It Va WITHOUT_INET6_SUPPORT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. +.It Va WITHOUT_INETD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INETD 279505 2015-03-01 22:03:52Z ngie +Set to not build +.Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. @@ -946,6 +975,10 @@ Set to not build radius support into var .Xr pam_radius 8 and .Xr ppp 8 . +.It Va WITHOUT_RBOOTD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RBOOTD 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr rbootd 8 . .It Va WITHOUT_RCMDS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the @@ -1041,6 +1074,11 @@ Set to not build or install .Xr talk 1 and .Xr talkd 8 . +.It Va WITHOUT_TCP_WRAPPERS +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr tcpd 8 , +and related utilities. .It Va WITHOUT_TCSH .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install @@ -1070,6 +1108,16 @@ When set, it also enforces the following .It .Va WITHOUT_GROFF .El +.It Va WITHOUT_TFTP +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TFTP 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr tftp 1 +and +.Xr tftpd 8 . +.It Va WITHOUT_TIMED +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TIMED 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr timed 8 . .It Va WITHOUT_TOOLCHAIN .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru Set to not install ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, sen
svn commit: r279508 - head/bin/sh
Author: jilles Date: Sun Mar 1 22:32:23 2015 New Revision: 279508 URL: https://svnweb.freebsd.org/changeset/base/279508 Log: sh: Fix more compiler warnings. Modified: head/bin/sh/eval.c head/bin/sh/eval.h head/bin/sh/histedit.c head/bin/sh/jobs.c head/bin/sh/options.c head/bin/sh/var.c Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Sun Mar 1 22:12:24 2015(r279507) +++ head/bin/sh/eval.c Sun Mar 1 22:32:23 2015(r279508) @@ -149,7 +149,7 @@ evalcmd(int argc, char **argv) */ void -evalstring(char *s, int flags) +evalstring(const char *s, int flags) { union node *n; struct stackmark smark; Modified: head/bin/sh/eval.h == --- head/bin/sh/eval.h Sun Mar 1 22:12:24 2015(r279507) +++ head/bin/sh/eval.h Sun Mar 1 22:32:23 2015(r279508) @@ -53,7 +53,7 @@ void reseteval(void); #define EV_TESTED 02 /* exit status is checked; ignore -e flag */ #define EV_BACKCMD 04 /* command executing within back quotes */ -void evalstring(char *, int); +void evalstring(const char *, int); union node;/* BLETCH for ansi C */ void evaltree(union node *, int); void evalbackcmd(union node *, struct backcmd *); Modified: head/bin/sh/histedit.c == --- head/bin/sh/histedit.c Sun Mar 1 22:12:24 2015(r279507) +++ head/bin/sh/histedit.c Sun Mar 1 22:32:23 2015(r279508) @@ -338,8 +338,8 @@ histcmd(int argc, char **argv __unused) out1fmt("%5d ", he.num); out1str(he.str); } else { - char *s = pat ? - fc_replace(he.str, pat, repl) : (char *)he.str; + const char *s = pat ? + fc_replace(he.str, pat, repl) : he.str; if (sflg) { if (displayhist) { @@ -477,7 +477,7 @@ bindcmd(int argc, char **argv) if (el == NULL) error("line editing is disabled"); - return (el_parse(el, argc, (const char **)argv)); + return (el_parse(el, argc, __DECONST(const char **, argv))); } #else Modified: head/bin/sh/jobs.c == --- head/bin/sh/jobs.c Sun Mar 1 22:12:24 2015(r279507) +++ head/bin/sh/jobs.c Sun Mar 1 22:32:23 2015(r279508) @@ -232,7 +232,7 @@ fgcmd(int argc __unused, char **argv __u int -bgcmd(int argc, char **argv) +bgcmd(int argc __unused, char **argv __unused) { struct job *jp; Modified: head/bin/sh/options.c == --- head/bin/sh/options.c Sun Mar 1 22:12:24 2015(r279507) +++ head/bin/sh/options.c Sun Mar 1 22:32:23 2015(r279508) @@ -465,7 +465,7 @@ getopts(char *optstr, char *optvar, char int ind = 0; int err = 0; char s[10]; - const char *optarg = NULL; + const char *newoptarg = NULL; if ((p = *optptr) == NULL || *p == '\0') { /* Current word is done, advance */ @@ -491,7 +491,7 @@ atend: if (optstr[0] == ':') { s[0] = c; s[1] = '\0'; - optarg = s; + newoptarg = s; } else out2fmt_flush("Illegal option -%c\n", c); @@ -507,7 +507,7 @@ atend: if (optstr[0] == ':') { s[0] = c; s[1] = '\0'; - optarg = s; + newoptarg = s; c = ':'; } else { @@ -519,7 +519,7 @@ atend: if (p == **optnext) (*optnext)++; - optarg = p; + newoptarg = p; p = NULL; } @@ -527,8 +527,8 @@ out: if (*optnext != NULL) ind = *optnext - optfirst + 1; *optptr = p; - if (optarg != NULL) - err |= setvarsafe("OPTARG", optarg, 0); + if (newoptarg != NULL) + err |= setvarsafe("OPTARG", newoptarg, 0); else { INTOFF; err |= unsetvar("OPTARG"); Modified: head/bin/sh/var.c == --- head/bin/sh/var.c Sun Mar 1 22:12:24 2015(r279507) +++ head/bin/sh/var.c Sun Mar 1 22:32:23 2015(r279508) @@ -141,6 +141,7 @@ static const int locale_categories[7] = static int v
svn commit: r279509 - head/sys/mips/atheros
Author: adrian Date: Mon Mar 2 01:23:59 2015 New Revision: 279509 URL: https://svnweb.freebsd.org/changeset/base/279509 Log: Add a MII mode for SGMII. This appears on the AR934x and later chips, although it's not something that's programmed via the arge0/arge1 register space. It's just cosmetic. Modified: head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xxreg.h == --- head/sys/mips/atheros/ar71xxreg.h Sun Mar 1 22:32:23 2015 (r279508) +++ head/sys/mips/atheros/ar71xxreg.h Mon Mar 2 01:23:59 2015 (r279509) @@ -273,6 +273,7 @@ typedef enum { AR71XX_MII_MODE_MII, AR71XX_MII_MODE_RGMII, AR71XX_MII_MODE_RMII, + AR71XX_MII_MODE_SGMII /* not hardware defined, though! */ } ar71xx_mii_mode; /* ___ 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: r279510 - head/sys/mips/atheros
Author: adrian Date: Mon Mar 2 01:53:47 2015 New Revision: 279510 URL: https://svnweb.freebsd.org/changeset/base/279510 Log: Add initial QCA955x support to if_arge.c. Tested: * AP135 development board, QCA9558 SoC. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Mon Mar 2 01:23:59 2015 (r279509) +++ head/sys/mips/atheros/if_arge.c Mon Mar 2 01:53:47 2015 (r279510) @@ -92,6 +92,7 @@ MODULE_VERSION(arge, 1); #include #include /* XXX tsk! */ +#include/* XXX tsk! */ #include #include #include @@ -111,7 +112,8 @@ static const char * arge_miicfg_str[] = "GMII", "MII", "RGMII", - "RMII" + "RMII", + "SGMII" }; #ifdef ARGE_DEBUG @@ -319,6 +321,7 @@ arge_reset_mac(struct arge_softc *sc) /* * AR934x (and later) also needs the MDIO block reset. +* XXX should methodize this! */ if (ar71xx_soc == AR71XX_SOC_AR9341 || ar71xx_soc == AR71XX_SOC_AR9342 || @@ -329,6 +332,15 @@ arge_reset_mac(struct arge_softc *sc) reset_reg |= AR934X_RESET_GE1_MDIO; } } + + if (ar71xx_soc == AR71XX_SOC_QCA9556 || + ar71xx_soc == AR71XX_SOC_QCA9558) { + if (sc->arge_mac_unit == 0) { + reset_reg |= QCA955X_RESET_GE0_MDIO; + } else { + reset_reg |= QCA955X_RESET_GE1_MDIO; + } + } ar71xx_device_stop(reset_reg); DELAY(100); ar71xx_device_start(reset_reg); @@ -400,6 +412,8 @@ arge_mdio_get_divider(struct arge_softc case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: table = ar933x_mdio_div_table; ndivs = nitems(ar933x_mdio_div_table); break; @@ -489,6 +503,8 @@ arge_fetch_mdiobus_clock_rate(struct arg case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: return (MAC_MII_CFG_CLOCK_DIV_58); break; default: @@ -793,6 +809,8 @@ arge_attach(device_t dev) case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG1, 0x0010); ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG2, 0x015500aa); break; @@ -1126,6 +1144,8 @@ arge_set_pll(struct arge_softc *sc, int case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: fifo_tx = 0x01f00140; break; case AR71XX_SOC_AR9130: ___ 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: r279511 - head/sys/mips/atheros
Author: adrian Date: Mon Mar 2 02:08:43 2015 New Revision: 279511 URL: https://svnweb.freebsd.org/changeset/base/279511 Log: [QCA955x] make the USB EHCI interrupts shareable. There's two EHCI controllers in the QCA955x SoCs - they have different interrupts available via various demux registers, but they both tie to IP3. So for now, allow them to be sharable so they can hang off of IP3. Modified: head/sys/mips/atheros/ar71xx_ehci.c Modified: head/sys/mips/atheros/ar71xx_ehci.c == --- head/sys/mips/atheros/ar71xx_ehci.c Mon Mar 2 01:53:47 2015 (r279510) +++ head/sys/mips/atheros/ar71xx_ehci.c Mon Mar 2 02:08:43 2015 (r279511) @@ -119,7 +119,7 @@ ar71xx_ehci_attach(device_t self) rid = 0; sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, - RF_ACTIVE); + RF_ACTIVE | RF_SHAREABLE); if (sc->sc_irq_res == NULL) { device_printf(self, "Could not allocate irq\n"); goto error; ___ 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: r279512 - head/sys/dev/ath
Author: adrian Date: Mon Mar 2 02:14:44 2015 New Revision: 279512 URL: https://svnweb.freebsd.org/changeset/base/279512 Log: Lay some groundwork for having this stuff hang off of AHB rather than the CPU nexus. * Add ahb as a possible bus attachment * Lay a comment down to remind me or whoever else ends up trying to debug why the EEPROM isn't mapped in as to what's going on. Modified: head/sys/dev/ath/if_ath_ahb.c Modified: head/sys/dev/ath/if_ath_ahb.c == --- head/sys/dev/ath/if_ath_ahb.c Mon Mar 2 02:08:43 2015 (r279511) +++ head/sys/dev/ath/if_ath_ahb.c Mon Mar 2 02:14:44 2015 (r279512) @@ -153,12 +153,24 @@ ath_ahb_attach(device_t dev) eepromsize = ATH_EEPROM_DATA_SIZE * 2; } - rid = 0; device_printf(sc->sc_dev, "eeprom @ %p (%d bytes)\n", (void *) eepromaddr, eepromsize); - psc->sc_eeprom = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, (uintptr_t) eepromaddr, - (uintptr_t) eepromaddr + (uintptr_t) (eepromsize - 1), 0, RF_ACTIVE); + /* +* XXX this assumes that the parent device is the nexus +* and will just pass through requests for all of memory. +* +* Later on, when this has to attach off of the actual +* AHB, this won't work. +* +* Ideally this would be done in machdep code in mips/atheros/ +* and it'd expose the EEPROM via the firmware interface, +* so the ath/ath_ahb drivers can be loaded as modules +* after boot-time. +*/ + psc->sc_eeprom = bus_alloc_resource(dev, SYS_RES_MEMORY, + &rid, (uintptr_t) eepromaddr, + (uintptr_t) eepromaddr + (uintptr_t) (eepromsize - 1), 0, RF_ACTIVE); if (psc->sc_eeprom == NULL) { device_printf(dev, "cannot map eeprom space\n"); goto bad0; @@ -349,6 +361,7 @@ static driver_t ath_ahb_driver = { }; static devclass_t ath_devclass; DRIVER_MODULE(ath, nexus, ath_ahb_driver, ath_devclass, 0, 0); +DRIVER_MODULE(ath, apb, ath_ahb_driver, ath_devclass, 0, 0); MODULE_VERSION(ath, 1); MODULE_DEPEND(ath, wlan, 1, 1, 1); /* 802.11 media layer */ MODULE_DEPEND(ath, if_ath, 1, 1, 1); /* if_ath driver */ ___ 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: r279513 - head/sys/mips/conf
Author: adrian Date: Mon Mar 2 02:24:46 2015 New Revision: 279513 URL: https://svnweb.freebsd.org/changeset/base/279513 Log: Bring over the initial QCA955x SoC support framework. This is enough to bring up the basic SoC support. What works thus far: * The mips74k core, pll setup, and UART (or else well, stuff would be really difficult..) * both USB 2.0 EHCI controllers * on-board 2GHz 3x3 wifi (the other variant has 2GHz/5GHz wifi on-chip); * arge0 - not yet sure why arge1 isn't firing off interrupts and thus handling traffic, but I will soon figure it out and fix it here. Tested: * AP135 reference design, QCA9558 SoC, pretending to be an 11n 2GHz AP. TODO: * There's an interrupt mux hooking up devices to IP2 and IP3 - but it's not a read-and-clear or write-to-clear register. So, trying to use it naively like I have been ends up with massive interrupt storms. For now the things that share those interrupts can just take them as shared interrupts and try to play nice. * There's two PCIe root complexes /and/ one of them can actually be a PCIe device endpoint. Yes, you heard right. I have to teach the AR724x PCIe bridge code to handle multiple instances with multiple memory/irq regions, and then there'll be RC support, but EP support isn't on my TODO list. * I'm not sure why arge1 isn't up and running. I'll go figure that out soon and fix it here. Thankyou to Qualcomm Atheros for providing me with hardware and an abundance of documentation about these things. Added: head/sys/mips/conf/QCA955X_BASE (contents, props changed) head/sys/mips/conf/QCA955X_BASE.hints (contents, props changed) Added: head/sys/mips/conf/QCA955X_BASE == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/QCA955X_BASE Mon Mar 2 02:24:46 2015 (r279513) @@ -0,0 +1,147 @@ +# +# QCA955X_BASE -- Kernel configuration base file for the Qualcomm Atheros +# QCA955x SoC. +# +# This file (and the hints file accompanying it) are not designed to be +# used by themselves. Instead, users of this file should create a kernel +# config file which includes this file (which gets the basic hints), then +# override the default options (adding devices as needed) and adding +# hints as needed (for example, the GPIO and LAN PHY.) +# +# $FreeBSD$ +# + +machine mips mips +ident QCA955X_BASE +cpuCPU_MIPS74KC +makeoptionsKERNLOADADDR=0x8005 +optionsHZ=1000 + +optionsBREAK_TO_DEBUGGER +optionsALT_BREAK_TO_DEBUGGER + +# options BOOTVERBOSE=10 + +files "../atheros/files.ar71xx" +hints "QCA955X_BASE.hints" + +makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols +# makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" +makeoptionsMODULES_OVERRIDE="" + +optionsDDB +optionsKDB +optionsALQ + +optionsSCHED_4BSD #4BSD scheduler +optionsINET#InterNETworking +#options INET6 #InterNETworking +#options NFSCL #Network Filesystem Client +optionsPSEUDOFS#Pseudo-filesystem framework +options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# Don't include the SCSI/CAM strings in the default build +optionsSCSI_NO_SENSE_STRINGS +optionsSCSI_NO_OP_STRINGS + +# .. And no sysctl strings +optionsNO_SYSCTL_DESCR + +# Limit IO size +optionsNBUF=128 + +# Limit UMTX hash size +# options UMTX_NUM_CHAINS=64 + +# PMC +#options HWPMC_HOOKS +#devicehwpmc +#devicehwpmc_mips24k + +# options NFS_LEGACYRPC +# Debugging for use in -current +#options INVARIANTS +#options INVARIANT_SUPPORT +#options WITNESS +#options WITNESS_SKIPSPIN +optionsFFS #Berkeley Fast Filesystem +#options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +#options UFS_DIRHASH #Improve performance on big directories +optionsNO_FFS_SNAPSHOT # We don't require snapshot support + +# Wireless NIC cards +optionsIEEE80211_DEBUG +optionsIEEE80211_SUPPORT_MESH +optionsIEEE80211_SUPPORT_TDMA +optionsIEEE80211_SUPPORT_SUPERG +optionsIEEE80211_ALQ # 802.11 ALQ logging support +device wlan# 802.11 support +device wlan_wep# 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 T
svn commit: r279514 - head/sys/mips/conf
Author: adrian Date: Mon Mar 2 02:27:25 2015 New Revision: 279514 URL: https://svnweb.freebsd.org/changeset/base/279514 Log: Add support for the AP135 2.0 reference platform. This is a QCA9558 SoC (2ghz 3x3) with an atheros 11ac PCIe 5GHz 3x3 NIC and an AR8327 gigabit ethernet switch. TODO: * The AR8327 gigabit switch support bugfixes are forthcoming. * 11ac support and 11ac NIC support Added: head/sys/mips/conf/AP135 (contents, props changed) head/sys/mips/conf/AP135.hints (contents, props changed) Added: head/sys/mips/conf/AP135 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AP135Mon Mar 2 02:27:25 2015(r279514) @@ -0,0 +1,60 @@ +# +# AP135 - the QCA955x SoC reference design +# +# This contains a QCA9558 MIPS74k SoC with on-board 3x3 2GHz wifi, +# 128MiB RAM, an AR8327 5-port gigabit ethernet switch and +# a QCA 11ac 5GHz AP NIC. +# +# The to things not currently support are the QCA 11ac NIC and +# PCIe host controllers - there's two of them, and the existing +# PCIe code here doesn't support that just yet. +# +# $FreeBSD$ +# + +# Include the default QCA955x parameters +include "QCA955X_BASE" + +ident AP135 + +# Override hints with board values +hints "AP135.hints" + +# Force the board memory - the base AP135 has 128MB RAM +options AR71XX_REALMEM=(128*1024*1024) + +# i2c GPIO bus +#devicegpioiic +#deviceiicbb +#deviceiicbus +#deviceiic + +# Options required for miiproxy and mdiobus +optionsARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy# MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# read MSDOS formatted disks - USB +#options MSDOSFS + +# Enable the uboot environment stuff rather then the +# redboot stuff. +optionsAR71XX_ENV_UBOOT + +# uzip - to boot natively from flash +device geom_uncompress +optionsGEOM_UNCOMPRESS + +# Used for the static uboot partition map +device geom_map + +# yes, this board has a PCI connected atheros device +device ath_pci +optionsAR71XX_ATH_EEPROM +device firmware# Used by the above +optionsATH_EEPROM_FIRMWARE + +# Boot off of the rootfs, as defined in the geom_map setup. +optionsROOTDEVNAME=\"ufs:map/rootfs.uncompress\" Added: head/sys/mips/conf/AP135.hints == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AP135.hints Mon Mar 2 02:27:25 2015 (r279514) @@ -0,0 +1,166 @@ +# This is a placeholder until the hardware support is complete. + +# I'm assuming this is an AP135-020. The AP136-010 in openwrt has +# the ethernet ports wired up to the switch in the reverse way. + +# $FreeBSD$ + +# QCA955X_ETH_CFG_RGMII_EN (1 << 0) +hint.qca955x_gmac.0.gmac_cfg=0x1 + +# mdiobus0 on arge0 +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1900 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# AR8327 - connected via mdiobus0 on arge0 +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=0 # definitely not the internal switch! +hint.arswitch.0.is_9340=0 # not the internal switch! +hint.arswitch.0.numphys=5 # all ports are PHYs +hint.arswitch.0.phy4cpu=0 +hint.arswitch.0.is_rgmii=0 # not needed +hint.arswitch.0.is_gmii=0 # not needed + +# This is where it gets a bit odd. port 0 and port 6 are CPU ports. +# The current code only supports one CPU port. So hm, what should +# we do to hook PAD6 up to be RGMII but a PHY, not a MAC? + +# The other trick - how do we get arge1 (hooked up to GMAC0) to work? +# That's currently supposed to be hooked up to CPU port 0. + +# Other AR8327 configuration parameters + +# AP136-020 parameters + +# GMAC0 AR8327 -> GMAC1 (arge1) SoC, SGMII + +# AR8327_PAD_MAC_SGMII +hint.arswitch.0.pad.0.mode=3 +#hint.arswitch.0.pad.0.rxclk_delay_sel=0 +hint.arswitch.0.pad.0.sgmii_delay_en=1 + +# GMAC6 AR8327 -> GMAC0 (arge0) SoC, RGMII + +# AR8327_PAD_MAC_RGMII +# XXX I think this hooks it up to the internal MAC6 +hint.arswitch.0.pad.6.mode=6 +hint.arswitch.0.pad.6.txclk_delay_en=1 +hint.arswitch.0.pad.6.rxclk_delay_en=1 +# AR8327_CLK_DELAY_SEL1 +hint.arswitch.0.pad.6.txclk_delay_sel=1 +# AR8327_CLK_DELAY_SEL2 +hint.arswitch.0.pad.6.rxclk_delay_sel=2 + +# XXX there's no LED management just yet! +hint.arswitch.0.led.ctrl0=0x +hint.arswitch.0.led.ctrl1=0xc737c737 +hint.arswitch.0.led.ctrl2=0x +hint.arswitch.0.led.ctrl3=0x00c30c00 +hint.arswitch.0.led.open_drain=1 + +# force_link=1 is required for the rest of the parameters +# to be configured. +hint.arswitch.0.port.0.force_link=1 +hint.arswitch.0.port.0.speed=1000 +hint.arswitch.0.port.0.duple
svn commit: r279516 - stable/10/sys/kern
Author: ae Date: Mon Mar 2 07:51:14 2015 New Revision: 279516 URL: https://svnweb.freebsd.org/changeset/base/279516 Log: MFC r279206: In some cases soreceive_dgram() can return no data, but has control message. This can happen when application is sending packets too big for the path MTU and recvmsg() will return zero (indicating no data) but there will be a cmsghdr with cmsg_type set to IPV6_PATHMTU. Remove KASSERT() which does NULL pointer dereference in such case. Also call m_freem() only when m isn't NULL. MFC r279209: soreceive_generic() still has similar KASSERT(), therefore instead of remove KASSERT(), change it to check mbuf isn't NULL. PR: 197882 Sponsored by: Yandex LLC Modified: stable/10/sys/kern/uipc_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_socket.c == --- stable/10/sys/kern/uipc_socket.cMon Mar 2 07:37:01 2015 (r279515) +++ stable/10/sys/kern/uipc_socket.cMon Mar 2 07:51:14 2015 (r279516) @@ -2189,7 +2189,8 @@ soreceive_dgram(struct socket *so, struc * Process one or more MT_CONTROL mbufs present before any data mbufs * in the first mbuf chain on the socket buffer. We call into the * protocol to perform externalization (or freeing if controlp == -* NULL). +* NULL). In some cases there can be only MT_CONTROL mbufs without +* MT_DATA mbufs. */ if (m->m_type == MT_CONTROL) { struct mbuf *cm = NULL, *cmn; @@ -2219,8 +2220,8 @@ soreceive_dgram(struct socket *so, struc cm = cmn; } } - KASSERT(m->m_type == MT_DATA, ("soreceive_dgram: !data")); - + KASSERT(m == NULL || m->m_type == MT_DATA, + ("soreceive_dgram: !data")); while (m != NULL && uio->uio_resid > 0) { len = uio->uio_resid; if (len > m->m_len) @@ -2237,9 +2238,10 @@ soreceive_dgram(struct socket *so, struc m->m_len -= len; } } - if (m != NULL) + if (m != NULL) { flags |= MSG_TRUNC; - m_freem(m); + m_freem(m); + } if (flagsp != NULL) *flagsp |= flags; return (0); ___ 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"